Creating a sub-user
When creating a sub-user, you can select the cameras, permissions, groups, and layouts that will be available to the sub-user.
If the permissions include analytics-related permissions, you will also need to provide the number of licenses of that type that the sub-user will have access to.
Currently, only users who are legal entities can create sub-users. Before adding a sub-user, a billing request is made. If the request is successful, the sub-user is created, otherwise, a 400 error is returned.
When creating users with a large number of cameras, you may need to send multiple requests. Each request can contain up to 500 cameras. For more details, please refer to the parameter description below.
POST/api/v1/users/subusersHeaders | |||||||||
Authorization | Bearer token | ||||||||
Accept | application/json | ||||||||
X-Client | ios-cctv|android-cctv|thick-legal|web | ||||||||
X-UUID | unique device id |
Body | |||||||||
json |
JSON
| ||||||||
namerequired | string | Sub-user's name | |||||||
emailrequired | string | Unique login (used as email) for the sub-user | |||||||
passwordrequired | string | Password for the sub-user | |||||||
password_confirmationrequired | string | Confirm the password to ensure it is entered correctly | |||||||
analytic_l1required | int | The number of level one analytics licenses that the sub-user will be able to create, only required if there are permissions for cases of this license type | |||||||
analytic_l2required | int | The number of level two analytics licenses that the sub-user will be able to create, only required if there are permissions for cases of this license type | |||||||
analytic_l3required | int | The number of level three analytics licenses that the sub-user will be able to create, only required if there are permissions for cases of this license type | |||||||
cameras_to_attachrequired | array | An array of camera IDs that will be available to the sub-user. You can include up to 500 elements in a single request. If you need more, you will need to send an Sub-user update after creation with the remaining cameras | |||||||
layoutsrequired | array | An array of layout IDs that will be available to the sub-user | |||||||
groupsrequired | array | An array of group IDs that will be available to the sub-user. Access is granted to the group entity itself, not to the cameras within the group. Separate access needs to be granted to the cameras | |||||||
marksrequired | array | An array of label IDs that will be available to the sub-user. This functionality is not available on the web interface, but the API allows it. However, access to the label requires access to the corresponding camera |
Response | |||||||||
200 |
| ||||||||
JSON
| |||||||||
400 | If the user is not a legal entity and the billing request fails | ||||||||
401 | Authorization token not provided or invalid, see Obtaining a token |
Example | |||||||||
JSON
|