Create а user
The method and parameters
POST /api/v1/billing/user/manage |
{
"login": "test@mail.com",
"password": "qweasdzxc",
"can_update_password": true,
"type": "type_value",
"billing_info": {
"billing_id": "123123123",
"billing_extra": []
},
"properties": [
{
"type": "phone",
"value": "+80283289362"
}
]
"status": "active",
}
The parameters
string login – is a required parameter. This parameter is a unique identifier that the user will use to access and authenticate to the video surveillance system. It can be any string of characters (e.g., john_smith, etc.) and doesn’t necessarily have to be in an email format.
The login is automatically generated and provided by the customer's external system. It is received through a callback mechanism after the user has been successfully registered in the customer's system.
string password – is a required parameter with a maximum length of 100 characters. The password is automatically generated and provided by the customer's external system via a callback. For maximum security, all passwords are stored in the VMS database exclusively in a hashed format.
boolean can_update_password – is optional and determines if a user is allowed to change their password. If this parameter isn’t specified, the system will automatically set it to true, granting the user permission to change their password.
string type – the parameter is required and has a maximum length of 50 characters. It specifies the user type. The value must correspond to one of the valid types listed in the cctv.user_types configuration file. The list of allowed values is set by the specialist who installed the platform. To get the current list of types, contact that specialist.
Please note that the values special and subuser aren’t allowed; using these types will result in an error.
arraybilling_info – parameter is optional. It is an object that contains additional user information received from the external billing system, such as identifiers (IDs) or metadata. The billing_extra field is used to transmit technical data from the billing system (for example, internal identifiers, tags, and extra fields).
string properties – an optional parameter with a maximum of 10 elements. It's an array of objects that contain custom user attributes, which can be used by both an external system and the video surveillance platform internal logic. These attributes could include things like contact information (phone, email, address, etc.) and other user-specific characteristics.
The properties field allows for the flexible addition of any extra user attributes that aren't tied directly to the external system's billing logic. For example, it could be used for the email address a user uses to log in to the video surveillance system.
Each element in the array must contain the following:
type: A required parameter with a maximum length of 100 characters. This is the attribute type (e.g.,phone,email).value: A required parameter with a maximum length of 255 characters. This is the attribute's value (e.g.,+80283289362).
string status – a user status. Available values:
active– the user in the Active status has access to the video surveillance system. This is the default value.blocked– the user in the Blocked status is denied access to the system.
User permissions
When a user is created, permissions are assigned by default based on the user type. These default permissions are defined in the system settings (default_permissions_<user_type> within the system_settings table).
You can find the full list of permissions on the Permissions: user, admin page. To modify user permissions, you can use the PATCH API method (detailed in the Update a user section) or change them through the video surveillance system Administrator interface.
For additional information on platform configuration and settings, including related environment variables, refer to the Env variables page.
200 |
Returns the user object
JSON
|
422 |
Returns a JSON object with an error For details, see Validation.
JSON
|