Getting a tree
Getting a tree
If a request is sent without any query parameters, a list of root groups will be returned. If a group has the field is_house set to true, it means that there are no other groups within that group, and it contains cameras. To obtain the cameras List of cameras in a group
GET /api/admin/v1/camera-group |
Method parameters
string
search, search is performed based on:
Camera address or name
User login, who is the owner of the camera, or legal entity ID
Stream UUID
Camera IP
In case of success, only the part of the tree where a match is found will be returned.
int
group_id, ID of the group
200 |
List of groups
JSON
|
401 |
Authorization token is not provided or is invalid. Obtaining a token |
cURL
BASH
curl -k --request POST \
--url 'https://your-domain/api/admin/v1/camera-group' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"search": "string",
"group_id": 0
}'
PHP
PHP
$data = array (
'search' => 'string',
'group_id' => 0,
);
$context = stream_context_create([
'ssl'=>['verify_peer' => false],
'http' => [
'method' => 'GET',
'header' => "Content-Type: application/json\r
Accept: application/json",
'content'=>json_encode($data)
]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/camera-group', false, $context);