Creating a custom group is only available for the custom Tree format
POST /api/admin/v1/camera-group
ip name, group name
ip
int parent_id, ID of the group that will be considered as the parent for the created group
int
201 Created
Created
Successful response
{ "id": 1, "name": "Cameras", "full_pretty": null, "is_house": 0, "cameras_count": 0, "parent_id": null, "csa_id": null, "intercoms_count": 0 }
401 Unauthorized
Unauthorized
Authorization token is not provided or is invalid. Obtaining a token
403 Forbidden
Forbidden
In case the tree format is not custom
422 Unprocessable Entity
Unprocessable Entity
Returns a JSON object with an error. Validation
{ "message": "There will be no informative message here", "errors": { "any_key": [ "The reason for the error will be described here" ] } }
curl -k --request POST \ --url 'https://your-domain/api/admin/v1/camera-group' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --data '{ "name": "ip", "parent_id": 0 }'
$data = array ( 'name' => 'ip', 'parent_id' => 0, ); $context = stream_context_create([ 'ssl'=>['verify_peer' => false], 'http' => [ 'method' => 'POST', '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);
Please note, these errors can depend on your browser setup.
If this problem persists, please contact our support.