Skip to main content

REST API (system)

warning

REST API (system) will be reduced in its feature set, as it would introduce duplicate functions as the new control API. Use Control API instead for new integrations of the following calls instead.

The following calls are deprecated within firmware version 10.2 and will be removed soon:

  • Load Mixer Snapshot
  • Save Mixer Snapshot
  • Load Channel Snapshot
  • Save Mixer Snapshot
  • Upload Mixer Snapshot
  • Download Mixer Snapshot
  • Upload Channel Snapshot
  • Download Channel Snapshot

The DHD REST API (system) comes with Firmware Version 9.1 and higher. It is meant to provide easy access to useful functionalities of the console and is designed primarily to write. Reading values is only possible for global labels. This is to prevent polling.

DHD REST API is restricted to an average of one request per second, but can handle bursts of up to 10 requests per second. After such a burst of e.g. 10 requests, you will have to wait 10 seconds before the server accepts any new calls. If you have a Burst of e.g. 5 requests, you will have to wait 5 seconds. During this 'grace period', the server will respond with code '423 (Locked)'.

note

All examples can vary on different platforms and shell / terminal environments. Please check for the correct syntax on your environment.

REST API must be enabled in Toolbox, [Device Node] > 'Web Apps' Tab, REST API checkbox.

Labels

Set Global Label

Set a single global label

Action path/action/setgloballabel
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt1Global label ID
NameStringtestNew global label value
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X GET 'http://1.2.3.4/action/setgloballabel?ObjectID=1&Name=test'

Get Global Label

Get a single global label

Action path/action/getgloballabel
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt_Global label ID
TokenStringXXX-XXX-XXXUser authentication (optional)

Response

The response is the label value in plain text.

Example Request

curl -L -X GET 'http://1.2.3.4/action/getgloballabel?ObjectID=1'

Reset Global Label

Reset a single global label to Toolbox default.

Action path/action/setgloballabel
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt1Global label ID
NameString_Has to be empty
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X GET 'http://1.2.3.4/action/setgloballabel?ObjectID=1&Name='

Set Channel Label

Set a single channel label

Action path/action/setchannellabel
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt1Fader Channel ID
NameStringtestNew channel label value
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X GET 'http://1.2.3.4/action/setchannellabel?ObjectID=1&Name=test'

Reset Channel Label

Reset a single channel label to Toolbox default.

Action path/action/setchannellabel
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt1Fader Channel ID
NameString_Has to be empty
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X GET 'http://1.2.3.4/action/setchannellabel?ObjectID=1&Name='

Pictures

Upload Picture

Upload a picture of file type .png. This function replaces an existing Resource File and can be used for picture elements within TFT views.

note

Other file types such as JPG are not supported.

We're using form-data for transmission of the required parameters and file.

Action path/action/updatepic
Types possiblePost

Params

KeyValue TypeExampleDescription
ObjectIDInt1Resource File ID
fileFileimage.pngProvide valid PNG here
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X POST 'http://1.2.3.4/action/updatepic' -F 'ObjectID=1' -F 'file=@image.png'

User

Login User

Login a specific user on a virtual mixer.

Action path/action/login
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt0Virtual Mixer ID
TokenStringXXX-XXX-XXXUser authentication

Example Request

curl -L -X GET 'http://1.2.3.4/action/login?Token=XXX-XXX-XXX&ObjectID=0'

User

Logout User

Logout any user on a virtual mixer with a valid user token.

Action path/action/logout
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt0Virtual Mixer ID
TokenStringXXX-XXX-XXXUser authentication

Example Request

curl -L -X GET 'http://1.2.3.4/action/logout?Token=XXX-XXX-XXX&ObjectID=0'

Snapshots

Load Mixer Snapshot

Load a mixer snapshot on the console.

Action path/action/loadmx
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt0Virtual Mixer ID
SnapshotIDInt1Snapshot ID to load
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X GET 'http://1.2.3.4/action/loadmx?ObjectID=0&SnapshotID=1'

Snapshots

Load Channel Snapshot

Load a channel snapshot on the console.

Action path/action/loadch
Types possibleGet, Post

Params

KeyValue TypeExampleDescription
ObjectIDInt0Fader Channel ID
SnapshotIDInt1Snapshot ID to load
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X GET 'http://1.2.3.4/action/loadch?ObjectID=0&SnapshotID=1'

Snapshots

Upload Channel Snapshot

Upload a channel snapshot on the console. The channel snapshot can be downloaded using Snapshots App.

Action path/action/uploadchsnap
Types possiblePost

Params

KeyValue TypeExampleDescription
SnapshotIDInt1Snapshot ID to load
filefileChannelSnap_1.sfpLocal fader shapshot file
TokenStringXXX-XXX-XXXUser authentication (optional)

Example Request

curl -L -X POST 'http://1.2.3.4/action/uploadchsnap' -F 'file=@ChannelSnap_1.sfp' -F 'SnapshotID=1'

Backup / Restore | Version >10.1

note

This feature comes with minimum firmware version 10.1.0

To choose what to backup or restore, we use tags. The following tags are allowed:

TagMeaningApplies to
ALLCreates/restores the full backup (no other tags allowed)All devices
FWCONFIGContains the device configuration (from Toolbox)XC3 / XD3 Cores
NETWORKContains the network config, such as IP addresses, device name, subnet masks, etc.All devices
TIMEZONEContains timezone and DST settingsAll devices
TLSContains the TLS certificate of the deviceAll devices
SERVICESContains the settings done on Manage Services PageAll devices
LOGContains syslog settingsAll devices
SNMPContains SNMP settingsAll devices
USERSContains the encrypted user database of the deviceXC3 / XD3 Cores
MXSNAPSContains all mixer snapshots of the deviceXC3 / XD3 Cores
CHSNAPSContains all channel and processing snapshots of the deviceXC3 / XD3 Cores
SNAPZEROContains snapshot zero of each virtual mixerXC3 / XD3 Cores
AES67CONFIGContains the AES67 configuration of the deviceAES67 Interfaces and XC3 Cores with license 52-8546
tip

This API feature can also be used to automatically renew TLS certificates.

Download Backup

Download a backup of all or selected parameters of the device.

note

A file of type ''.bin'' will be downloaded. This has the same contents as the manually downloaded ''.tgz'' file from System App.

Action path/action/backup
Types possiblePost, Get

Params

KeyValue TypeExampleDescription
TokenStringXXX-XXX-XXXUser authentication (required)
TagsStringALLDefine what to backup (see list above)

Example Request

Creating a full backup:

curl -L -X GET 'http://1.2.3.4/action/backup?Token=XXX-XXX-XXX&Tags=ALL' 

** Creating a selective backup of SNMP and Network Config: **

curl -L -X GET 'http://1.2.3.4/action/backup?Token=XXX-XXX-XXX&Tags=NETWORK,SNMP' 

Restore (Upload and Apply Backup File)

Upload and restore a previously downloaded backup of all or selected parameters of the device.

We're using form-data for transmission of the required parameters and file.

warning

Selected data of the device will be overwritten, the device may restart to apply the backup, and audio will be interrupted.

note

File types ''.bin'' and ''.tgz'' are supported.

Action path/action/restore
Types possiblePost

Params

KeyValue TypeExampleDescription
TokenStringXXX-XXX-XXXUser authentication (required)
TagsStringALLDefine what to backup (see list above)

Example Request

Restore all Backup Data:

curl -L -X POST 'http://1.2.3.4/action/restore' -F 'file=@Backup.bin' -F 'Tags=ALL' -F 'Token=XXX-XXX-XXX'

Restore only Network and AES67 Configuration

curl -L -X POST 'http://1.2.3.4/action/restore' -F 'file=@Backup.bin' -F 'Tags=NETWORK,AES67CONFIG' -F 'Token=XXX-XXX-XXX'

Responses

The server will respond with a status 200 and a JSON object. The JSON object contains the received values such as some data required by DHD audio for debugging. If something on your request goes wrong, the JSON object will contain an Error entry.

If the server doesn't respond with status code 200:

  • Status code 423 (Locked): the REST API is locked because of too many requests (more than 10 per minute)
  • Status code 405 (Method Not Allowed):
    • Check if your license 52-8577 DHD REST API is valid
    • Check if REST API checkbox is enabled within Toolbox [Device Node] > Web Apps Tab