set_active
To deactivate or activate a unit, use the unit/set_active command.
svc=unit/set_active¶ms={
"itemId": <long>,
"active": <bool>
}
Parameters
The request must contain the following parameters:
| Parameter | Description |
|---|---|
| itemId | Unit ID. |
| active | Required action: 0 — deactivation, 1 — activation. |
Response
If the request is completed successfully, the following response is returned:
{
"active":<bool>, /* 0 — unit deactivated, 1 — unit activated */
}
Otherwise, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Invalid input format |
| 6 | One of the following errors:
|
| 7 | One of the following errors:
|