Breadcrumbs

Get a list оf cameras by an external system

The method and parameters

GET  /api/v1/billing/cameras/list

array cameras_ids  required – array of camera identifiers (id). Maximum 30 elements. Mandatory if cameras_uuid or login aren’t sent.


array cameras_uuid  required – array of camera identifiers (external_id). Maximum 30 elements. Mandatory if cameras_ids or login aren’t sent.


string login  required – the login of the user, the list of cameras to get. Mandatory if cameras_ids or cameras_uuid are not sent.

200  OK

A successful response

JSON
[
    {
        "id": 3,
        "external_id": "3",
        "start_at": null,
        "status": "active",
        "name": "Camera 1",
        "group_type": "public",
        "streams": [
            {
                "type": "high",
                "status": "active",
                "camera_id": 3
            },
            {
                "type": "low",
                "status": "active",
                "camera_id": 3
            }
        ],
        "preview": "https://server1.domain.video:8443/live/a2aefb0f-d3f7-4fb7-9828-218badead1f4/preview.mp4?token=xUXC_FOaJBQkSaxyZMBG77zC9pgULKSjA-EShnSzQbM-h7ePl8h76Dd20CYwTVihT2QzHZSX9d1DCPs8ttooqfzdgJb1RltcR1l3DgCmfFz68UUX_xEkGKNWbt5UPakGQXr5h1yMP7WE-CZ8CGqU6g~~"
    },
    {
        "id": 4,
        "external_id": "4",
        "start_at": null,
        "status": "active",
        "name": "Camera 2",
        "group_type": "private",
        "streams": [
            {
                "type": "high",
                "status": "active",
                "camera_id": 4
            },
            {
                "type": "low",
                "status": "active",
                "camera_id": 4
            }
        ],
        "preview": "https://domain.com:8443/live/67aa0ee2-1f32-4e8e-b383-ca02c87e8390/preview.mp4?token=sometoken"
    }
]

200  OK

Cameras were not found

JSON
null

401  Unauthorized

An authorization token isn’t sent or invalid

422  Unprocessable Entity

Returns a JSON object with an error. For details, see General information > Validation.

JSON
{
    "message": "No error message here",
    "errors": {
        "any_key": [
            "Error details"
        ]
    }
}
cURL
Bash
curl -k --request GET \
	--url 'https://your-domain/api/v1/billing/cameras/list' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "cameras_ids": [],
    "cameras_uuid": [],
    "login": "string"
}'
PHP
PHP
$data = array (
  'cameras_ids' => 
  array (
  ),
  'cameras_uuid' => 
  array (
  ),
  'login' => 'string',
);
$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/v1/billing/cameras/list', false, $context);