update_units
To add units to a group or remove them from it, use the unit_group/update_units method.
svc=unit_group/update_units¶ms={
"itemId": <long>,
"units": [<long>]
}
Parameters
The required parameters are marked with an asterisk (*).
| Parameter | Description |
|---|---|
itemId* |
Unit group ID. |
units* |
Array of unit IDs. |
The units parameter must contain the IDs of both the units that have already been added and the ones you want to add. To remove a unit from the group, list only the IDs of the units that should remain in the group.
Response
If the request is completed successfully, the response is returned in the following format:
{
"u": [<long>] /* Array of unit IDs. */
}
If the request fails, an error code is returned.
Error codes
| Error code | Description |
|---|---|
| 4 | Wrong input parameters. |
| 6 | Failed to write the new list of units. |
| 7 | Session check failed, or the unit group isn’t found, or you have no Edit ACL-propagated objects access right to the unit group. |