The method and parameters
|
POST /api/v1/billing/user/manage/cameras |
This synchronizes a user's cameras based on their login.
You can set camera access in a few ways:
-
Without specifying any additional parameters (the current settings will remain unchanged during this synchronization):
JSON
{
"login": "test@mail.com",
"camera_ids": [
3,
4
],
"camera_external_ids": [
"00000000-0000-0000-0000-000000000050",
"00000000-0000-0000-0000-000000000051"
],
"public_group_external_ids": [
"df2f2f7a-ecd6-4ffd-8a23-6880b803d23a"
],
"private_group_external_ids": [
{
"key": "test",
"group_external_id": "df2f2f7a-ecd6-4ffd-8a23-6880b803d23a"
}
]
}
-
Include additional parameters for the camera:
JSON
{
"login": "test@mail.com",
"camera_ids": [
{
"camera_id": 3,
"status": "active"
},
{
"camera_id": 4,
"status": "blocked"
},
{
"camera_id": 5,
"status": "blocked"
}
],
"camera_external_ids": [
{
"external_id": "00000000-0000-0000-0000-000000000050",
"status": "active"
},
{
"external_id": "00000000-0000-0000-0000-000000000051",
"status": "blocked"
}
],
"public_group_external_ids": [
{
"external_id": "df2f2f7a-ecd6-4ffd-8a23-6880b803d23a",
"status": "blocked"
}
],
"private_group_external_ids": [
{
"key": "folder 1",
"group_external_id": "df2f2f7a-ecd6-4ffd-8a23-6880b803d23a",
"status": "active"
},
{
"key": "folder 2",
"group_external_id": "df2f2f7a-ecd6-4ffd-8a23-6880b803d23a",
"status": "blocked"
}
]
}
The parameters
string login – a user login.
array camera_ids – a list of camera IDs from the VMS database.
array camera_external_ids – a list of camera identifiers that were specified when creating the camera.
array public_group_external_ids – a list of IDs of public camera groups.
array private_group_external_ids – a list of identifiers of private camera groups
|
204 |
|
Successful response |
|
422 |
|
Returns a JSON object with an error. JSON
|