To create, edit or delete command, use the command unit/update_command_definition:
svc=unit/update_command_definition¶ms={"itemId":<long>, "id":<long>, "callMode":<text>, "n":<text>, "c":<text>, "l":<text>, "p":<text>, "a":<long>}
Name | Description |
---|---|
itemId | unit ID |
id | command ID |
callMode | action: create, update, delete |
Parameters required only for create and update: | |
n | command name |
c | type (see below) |
l | link type (see below) |
p | parameters |
a | access level: rights that user must have to execute current command (see Access flags: General and Access flags: Units and unit groups) |
Optional (to copy command from other unit): | |
oldItemId | copied command unit ID |
oldCmdId | copied command ID |
Command types:
Link types:
On create and edit:
[ <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 */ } ]
On delete:
[ <long>, /* command ID */ null ]
|