Updаte a user
The method and parameters
PATCH /api/v1/billing/user/manage |
This method is used by an external system to update a user.
{
"login": "test@mail.com",
"password": "qweasdzxc",
"can_update_password": true,
"status": "active",
"billing_info": {
"billing_id": "123123123",
"billing_extra": []
},
"properties": [
{
"type": "phone",
"value": "+80283289362"
}
],
"permissions_to_attach": [
"archives-show",
"archives-download"
],
"permissions_to_detach": [
"archives-preview-download"
]
}
string login – this is a unique identifier used by the user to access and authenticate within the video surveillance system. It can be any string of characters and doesn't necessarily need to be an email address. The login is automatically generated and provided by the external customer system via a callback mechanism after the user has successfully registered.
string password – is the optional parameter. The maximum length is 100 characters. The password is automatically generated and provided by the external customer 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.
string status – is the optional parameter of 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.
arraybilling_info – 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).
arrayproperties – 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).
array permissions_to_attach – an optional parameter. The list of permissions that can be granted to the user. You can find the full list of permissions on the Permissions: user, admin page.
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).
array permissions_to_detach – an optional parameter. The list of permissions to revoke from the user. You can find the full list of permissions on the Permissions: user, admin page.
200 |
Returns the user object
JSON
|
422 |
Returns a JSON object with an error For details, see Validation.
JSON
|