exec_cmd

To send a command to a unit, use the unit/exec_cmd request.

Copied!
svc=unit/exec_cmd&params={"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:

  • use any (primary, then secondary);
  • 0x1  use primary;
  • 0x2  use secondary;
  • 0x10  send param in JSON format.

Response

If the request is completed successfully, an empty response is returned.

Copied!
{}	

Otherwise, an error code is returned.

Error codes

Error code

Description

5Failed to execute the command.
7Failed to fetch the unit because the user doesn't have the required access right (ADF_ACL_AVL_UNIT_EXEC_CMDS).
Download PDF file
Download Word document

See also