exec_cmd
To send a command to a unit, use the unit/exec_cmd request.
svc=unit/exec_cmd¶ms={"itemId":<long>,
"commandName":<text>,
"linkType":<text>,
"param":<text>,
"timeout":<uint>,
"flags":<uint>}
Parameters
Name | Description |
---|---|
itemId | Unit ID. |
commandName | Command name. |
linkType | Link type (see update_command_definition). |
param | Parameters (if necessary). |
timeout | Timeout for the command to be in the command queue, in seconds. |
flags | Flags for selecting a phone number to execute the command:
|
Response
If the request is completed successfully, an empty response is returned.
{}
Otherwise, an error code is returned.
Error codes
Error code | Description |
---|---|
5 | Failed to execute the command. |
7 | Failed to fetch the unit because the user doesn't have the required access right (ADF_ACL_AVL_UNIT_EXEC_CMDS). |