Skip to main content

App Permissions

API keys in Relay control what a client is allowed to do after it connects.

Permissions are defined per module. Each module has a set of actions that can be individually enabled or disabled for a given API key.


Permission Model​

Relay permissions are organized by module. Each module supports a specific set of actions.

Across all modules, the listen action allows the client to receive real-time messages for that module. The remaining actions control standard CRUD and module-specific operations.


Modules and Actions​

Telemetry​

ActionDescription
listenReceive real-time telemetry data streams

Commands​

Commands has two sub-modules: RPC and Queue.

RPC​

ActionDescription
listenReceive real-time RPC command messages
callInvoke RPC commands on devices

Queue​

ActionDescription
callEnqueue commands for later execution on devices

Alerts​

ActionDescription
listenReceive real-time alert notifications
createCreate new alert rules
updateModify existing alert rules
deleteRemove alert rules
listList all alert rules
historyView past alert events

Presence​

ActionDescription
listenReceive real-time device presence updates

Logical Groups​

ActionDescription
listenReceive real-time updates for logical group changes
createCreate new logical groups
updateModify existing logical groups
deleteRemove logical groups
listList all logical groups and their respective devices

Hierarchy Groups​

ActionDescription
listenReceive real-time updates for hierarchy group changes
createCreate new hierarchy groups
updateModify existing hierarchy groups
deleteRemove hierarchy groups
listList all hierarchy groups and their respective devices

Devices​

ActionDescription
createRegister new devices
updateModify existing devices
deleteRemove devices
listList all devices

Full Permission Reference​

Here is the complete permission object with all modules and actions:

{
"telemetry": { "listen": true },
"commands": {
"rpc": { "listen": true, "call": true },
"queue": { "call": true }
},
"alerts": {
"listen": true,
"create": true,
"update": true,
"delete": true,
"list": true,
"history": true
},
"presence": { "listen": true },
"logical_group": {
"listen": true,
"create": true,
"update": true,
"delete": true,
"list": true
},
"heirarchy_group": {
"listen": true,
"create": true,
"update": true,
"delete": true,
"list": true
},
"devices": {
"create": true,
"update": true,
"delete": true,
"list": true
}
}

Set any action to false (or omit it) to deny that permission for the API key.


Where Permissions Are Configured​

To edit permissions:

  1. Open the Developer Console
  2. Select App from the left-hand menu
  3. Select the app you want to modify
  4. Edit the permissions for each module
warning

You will have to reconnect to the server after the change is made for it to reflect.


Common Mistakes​

  • Trying to edit permissions while a key is enabled
  • Forgetting to enable listen when you need real-time updates for a module
  • Enabling delete on devices or groups without understanding the impact
  • Assuming list implies listen — they are independent actions