Camera switcher

This tutorial provides a step-by-step guide to managing camera switcher in a Nureva® audio system using the available API.

📘

Currently, full support is available only for the INOGENI® CAM230 camera switcher. Other camera switchers may have limited or unsupported functionality.

Supported devices

  • HDL310, HDL410
  • HDX

What can be controlled with the API?

  • Add a camera switcher to a Nureva system
  • Set (update) properties of a camera switcher
  • Get information about configured camera switcher
  • Remove a camera switcher from the system

Minimum role required: general

The Get devices, Get device, Post devices, Update device and Delete device endpoints can be accessed with the general role (recommended) or any role of a higher level. Follow the Authorization tutorial to authenticate with a general role and obtain YOUR_GENERAL_AUTHPARAMETERS which is required for the requests below.

Overview

  1. Use Post devices to register new camera switcher to Nureva system.

  2. Use Get devices to get all peripheral configurations.

  3. Use Get device to get a specific peripheral configuration.

  4. Use Update device to update the peripheral configuration.

  5. Use Delete device to remove peripheral from Nureva system.


Instructions

Step 1 - Make a request to register new peripheral to Nureva system

To add (register) a new camera switcher, use the Post devices endpoint

  1. Set the path with the IP address of the Nureva device followed by /api/v1/room/devices.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint using the general account.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the POST request with "deviceType": "camera-switcher" and customName (optional), network settings and access information. The code sample below is a request to add camera switcher for the Nureva device with the IP address of 10.0.0.1.

Example of request

Using username and password
curl --request POST \
    --url https://10.0.0.1/api/v1/room/devices \
    --header 'Authorization: Nureva <YOUR_GENERAL_AUTHPARAMETERS>' \
    --header 'Nureva-Client-Id: integration_app_name' \
    --header 'Nureva-Client-Version: 0.0.1' \
    --header 'Content-Type: application/json' \
    --data '{
        "deviceType": "camera-switcher",
        "customName": "Camera switcher",
        "ipOrHostname": "192.168.1.165",
        "port": 443,
        "username": "<YOUR_INOGENI_USER>",
        "password": "<YOUR_INOGENI_PASSWORD>"
    }'
Using access token
curl --request POST \
    --url https://10.0.0.1/api/v1/room/devices \
    --header 'Authorization: Nureva <YOUR_GENERAL_AUTHPARAMETERS>' \
    --header 'Nureva-Client-Id: integration_app_name' \
    --header 'Nureva-Client-Version: 0.0.1' \
    --header 'Content-Type: application/json' \
    --data '{
        "deviceType": "camera-switcher",
        "customName": "Camera switcher",
        "ipOrHostname": "192.168.1.165",
        "port": 443,
        "accessToken": "<YOUR_INOGENI_ACCESS_TOKEN>"
    }'
  1. If the call is successful, an HTTP status code of 200 OK and a generated device ID (UUID v4) will be returned.
{
  "deviceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
  1. You may also need to Configure the camera switcher.

Step 2 - Make a request to get all peripheral configurations

To get all peripheral configurations, use the Get devices endpoint

  1. Set the path with the IP address of the Nureva device followed by /api/v1/room/devices.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint using the general account.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the GET request. The code sample below is a request to retrieve the peripherals for the Nureva device with the IP address of 10.0.0.1.

Example of request

curl --request GET \
    --url https://10.0.0.1/api/v1/room/devices \
    --header 'Authorization: Nureva <YOUR_GENERAL_AUTHPARAMETERS>' \
    --header 'Nureva-Client-Id: integration_app_name' \
    --header 'Nureva-Client-Version: 0.0.1' \
  1. If the call is successful, an HTTP status code of 200 OK and the Nureva device details together with all its peripherals will be returned.

Example of response

{
  "devices": [
    {
      "deviceId": "MK072S69M025060",
      "deviceType": "nu-audio-device",
      "audioDeviceType": "hdl410",
      "deviceStatusColor": "green",
      "hardwareComponents": [
        {
          "portNumber": 1,
          "hardwareId": "AAFDE9C1E2E7",
          "connectionStatus": "Connected",
          "model": "Bar"
        },
        {
          "portNumber": 2,
          "hardwareId": "AAD7F5C1E2E7",
          "connectionStatus": "Connected",
          "model": "Bar"
        }
      ]
    },
    {
      "deviceType": "camera-switcher",
      "customName": "Inogeni CAM230",
      "deviceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "currentStatus": true,
      "ipOrHostname": "192.168.1.165",
      "port": 443,
      "enabled": true,
      "model": "CAM230",
      "activeCameraInput": null
    }
  ]
}

Step 3 - Make a request to get camera switcher configuration

To get the camera switcher configuration of a single peripheral, use the Get device endpoint

  1. Set the path with the IP address of the Nureva device followed by /api/v1/room/devices/<deviceId>, where deviceId is the ID of the peripheral.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint using the general account.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the GET request. The code sample below is a request to retrieve the camera switcher configuration for the Nureva device with the IP address of 10.0.0.1 and device ID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Example of request

curl --request GET \
    --url https://10.0.0.1/api/v1/room/devices/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
    --header 'Authorization: Nureva <YOUR_GENERAL_AUTHPARAMETERS>' \
    --header 'Nureva-Client-Id: integration_app_name' \
    --header 'Nureva-Client-Version: 0.0.1' \
  1. If the call is successful, an HTTP status code of 200 OK and the specified peripheral configuration will be returned.

Example of response

{
  "deviceType": "camera-switcher",
  "customName": "Inogeni CAM230",
  "deviceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "currentStatus": true,
  "ipOrHostname": "192.168.1.165",
  "port": 443,
  "enabled": true,
  "model": "CAM230",
  "activeCameraInput": null
}

Step 4 - Make a request to update camera switcher configuration

To set (update) a camera switcher configuration, use the Update device endpoint

  1. Set the path with the IP address of the Nureva device followed by /api/v1/room/devices/<deviceId>, where deviceId is the ID of the peripheral.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint using the general account.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the PATCH request to update the peripheral settings. The code sample below is a request to update the peripheral settings for the Nureva device with the IP address of 10.0.0.1 and device ID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The example includes all the optional properties. At least one property must be specified.

Example of request

curl --request PATCH \
    --url https://10.0.0.1/api/v1/room/devices/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
    --header 'Authorization: Nureva <YOUR_GENERAL_AUTHPARAMETERS>' \
    --header 'Nureva-Client-Id: integration_app_name' \
    --header 'Nureva-Client-Version: 0.0.1' \
    --header 'Content-Type: application/json' \
    --data '{
        "customName": "new name",
        "ipOrHostname": "192.168.1.166",
        "port": 443,
        "enabled": true
    }'
  1. If the call is successful, an HTTP status code of 200 OK and the peripheral device ID will be returned.

Example of response

{
  "deviceId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}

Step 5 - Make a request to remove camera switcher configuration

To remove a camera switcher from Nureva system, use the Delete device endpoint

  1. Set the path with the IP address of the Nureva device followed by /api/v1/room/devices/<deviceId>, where deviceId is the ID of the peripheral.
  2. Update the headers to include Authorization as key and the value being Nureva followed by the authParameters received from the login endpoint using the general account.
  3. Update the headers to include Nureva-Client-Id as key and integration_app_name as the value.
  4. Update the headers to include Nureva-Client-Version as key and 0.0.1 as the value.
  5. Send the DELETE request. The code sample below is a request to delete the camera switcher from the Nureva device with the IP address of 10.0.0.1 and device ID xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

Example of request

curl --request DELETE \
    --url https://10.0.0.1/api/v1/room/devices/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \
    --header 'Authorization: Nureva <YOUR_GENERAL_AUTHPARAMETERS>' \
    --header 'Nureva-Client-Id: integration_app_name' \
    --header 'Nureva-Client-Version: 0.0.1'
  1. If the call is successful, an HTTP status code of 200 OK will be returned.

Tutorial complete!

You now understand how to add, retrieve, configure, and remove camera switcher.


Did this page help you?