Sub-user update
After the update, if there were changes in cameras, labels, layouts, groups, and permissions, a push notification will be sent with an array of IDs that were added or removed.
If access to certain cameras is revoked, the labels created for those cameras will be deleted, as well as the cameras from any created groups and layouts associated with this user.
When updating users, the parameters «cameras_to_attach» and «cameras_to_detach» should only be sent when there are changes, and only with the IDs of cameras that are currently being added or removed.
When adding or removing a large number of cameras, multiple requests will be required because each request can only include a maximum of 500 cameras.
PUT/api/v1/users/subusers/{subuser}Headers | |||||||||
Authorization | Bearer token | ||||||||
Accept | application/json | ||||||||
X-Client | ios-cctv|android-cctv|thick-legal|web | ||||||||
X-UUID | unique device id |
Body | |||||||||
json |
JSON
| ||||||||
subuseroptional | int | Identifier of the sub-user to update | |||||||
namerequired | string | Sub-user name | |||||||
emailrequired | string | Unique login (email) for the sub-user | |||||||
analytic_l1required | int | Number of level-one analytics licenses the sub-user can create. This is mandatory only if there are permissions for this license level | |||||||
analytic_l2required | int | Number of level-two analytics licenses the sub-user can create. This is mandatory only if there are permissions for this license level | |||||||
analytic_l3required | int | Number of level-three analytics licenses the sub-user can create. This is mandatory only if there are permissions for this license level | |||||||
cameras_to_attachrequired | array | Array of camera IDs to add to the sub-user. Maximum of 500 elements | |||||||
cameras_to_detachrequired | array | Array of camera IDs to remove from the sub-user. Maximum of 500 elements | |||||||
layoutsrequired | array | Array of layout IDs that will be accessible to the sub-user | |||||||
groupsrequired | array | Array of group IDs that will be accessible to the sub-user. Access is granted to the group entity itself, not the cameras within the group. Access to individual cameras within the group needs to be granted separately | |||||||
marksrequired | array | Array of label IDs that will be accessible to the sub-user. Note that this functionality is not available on the web, but the API supports it. Access to the label requires access to the associated camera |
Response | |||||||||
200 | Successful response | ||||||||
JSON
| |||||||||
404 | If the sub-user does not belong to the user or does not exist | ||||||||
401 | Authorization token not provided or invalid, see Obtaining a token |
Example | |||||||||
JSON
|