get_command_definition_data

To get the command definition data, use the unit/get_command_definition_data request.

Copied!
svc=unit/get_command_definition_data&params={"itemId":<long>,
					     "col":[<long>]}

Parameters

The required parameters are marked with an asterisk (*).

Parameter

Description

itemId*

Unit ID.

col

Array of command IDs. If this parameter is specified, the response is filtered by IDs.

Response

If the request is completed successfully, the response contains the command definition data.

Copied!
[
    <long>,       /* Command ID */
    {
        "id":<long>,  /* Command ID */
        "n":<text>,   /* Command name */
        "c":<text>,   /* Command type */
        "l":<text>,   /* Link type */
        "p":<text>,   /* Parameters */
        "a":<uint>,   /* Access level */
        "f":<uint>,   /* Flags */
        "jp":<uint>   /* JSON parameters */ 
    }
]

If the request fails, the response contains error code 7, indicating that the user does not have the required access rights (ADF_ACL_AVL_UNIT_VIEW_CMD_ALIASES) to the unit.

Download PDF file
Download Word document

See also