RPC Method
For tasks that are not executed within the system real time engine, the device supports remote procedure calls (RPC). RPC are executed asynchronous to the audio and logic system. RPC work with HTTP/POST as well as WebSockets.
RPCs are currently only available on core devices, not on AES67 Ravenna devices.
RPC structure
RPC use the rpc method and transmit their own call within the message payload. We do this to keep control API structure consistent and use the same endpoints for other request types.
RPC messages are therefore formatted like this:
{"method":"rpc", "payload":{"method":"", "params":{}} }
- the
payloadobject encapsulates the rpc itself with its available method and respective parameters - for HTTP/POST requests, make sure to also include a
token - for WebSockets, you may include a
msgID(optional)
Answers to RPC are formatted like this:
{"method":"rpc", "payload":{"method":"","params":{},"result":{}},"success":true}
Sample RPC
For example, to retrieve a list of available mixer snapshots, use the following RPC:
{
"method": "rpc",
"token": "xxx",
"payload": {
"method": "getsnapshotlist",
"params": {
"type": 2
}
}
}
This will be answered with a list like this
{
"method": "rpc",
"payload": {
"method": "getsnapshotlist",
"params": {
"type": 2
},
"result": [
{
"factory": true,
"id": "default",
"name": "default",
"readgroups": 0,
"writegroups": 0
},
{
"factory": false,
"id": "d2b49cd3-5dea-4f9a-9fe1-382ea7b66fa0",
"name": "test",
"readgroups": 0,
"writegroups": 0
}
]
},
"success": true
}
For the following documentation, we will only provide the payload object. When using RPC, make sure to encapsulate them like shown above.
Available RPCs
Snapshots
For snapshots (or presets), we differ between 3 types:
- Type
1: Channel Snapshots (the channel processing and routing) - Type
2: Mixer Snapshots (the whole state of a mixer) - Type
3: Processing Snapshots (flex processing parameters)
Saving, deleting or modifying snapshots requires sufficient user rights within the API or on the frontend. The user rights are inherited from the user groups defined as a bitmask in readgroups and writegroups.
User group bitmasks
The Bitmasks used for readgroups and writegroups are coded like the following:
| Group | Decimal Value | Binary Representation | Hexadecimal Representation |
|---|---|---|---|
| Group 1 | 1 | 0b00000001 | 0x00000001 |
| Group 2 | 2 | 0b00000010 | 0x00000002 |
| Group 3 | 4 | 0b00000100 | 0x00000004 |
| Group 4 | 8 | 0b00001000 | 0x00000008 |
| Group 5 | 16 | 0b00010000 | 0x00000010 |
| Group 6 | 32 | 0b00100000 | 0x00000020 |
| Group 7 | 64 | 0b01000000 | 0x00000040 |
| Group 8 | 128 | 0b10000000 | 0x00000080 |
Examples
-
Group 1 only:
- Decimal:
1 - Binary:
0b00000001 - Hex:
0x00000001
- Decimal:
-
Group 4 only:
- Decimal:
8 - Binary:
0b00001000 - Hex:
0x00000008
- Decimal:
-
Group 8 only:
- Decimal:
128 - Binary:
0b10000000 - Hex:
0x00000080
- Decimal:
-
Group 1, 4, and 8:
- Decimal:
137 - Binary:
0b10001001 - Hex:
0x00000089
- Decimal:
-
All groups set:
- Decimal:
255 - Binary:
0b11111111 - Hex:
0x000000FF
- Decimal:
getsnapshotlist
Get a list of available snapshots by type.
Request:
{
"method": "rpc",
"payload": {
"method": "getsnapshotlist",
"params": {
"type": 2,
"mixer": 0
}
}
}
type(required)mixer(optional): defines the virtual mixer for mixer snapshots. Default value 0 applied when not defined.
Response:
{
"method": "rpc",
"payload": {
"method": "getsnapshotlist",
"params": {
"type": 2
},
"result": [
{
"factory": false,
"id": "[uuid]",
"name": "morning",
"readgroups": 0,
"writegroups": 1
},
{
"factory": false,
"id": "[uuid]",
"name": "evening",
"readgroups": 0,
"writegroups": 1
}
]
},
"success": true
}
result: an array of all available snapshots by ID (UUID) and name.factory: factory snapshots are predefined by DHD and can not be modified or overwritten.