Skip to main content
Skip table of contents

Get a list of cameras by an external system

The method and parameters

Get a list of cameras.

GET /api/v1/billing/cameras/list

array cameras_ids REQUIRED – array of camera identifiers (id). Maximum 30 elements. Mandatory if cameras_uuid or login are not sent.


array cameras_uuid REQUIRED – array of camera identifiers (external_id). Maximum 30 elements Mandatory if cameras_ids or login are not 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

Successful response

CODE
[
    {
        "id": 3,
        "external_id": "3",
        "start_at": null,
        "status": "active",
        "name": "Parking on the left",
        "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": "Parking on the right",
        "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

Authorization token not sent or not valid

422 Unprocessable Entity

Returns a JSON object with an error. General information/validation

JSON
{
    "message": "There will be no informative message here",
    "errors": {
        "any_key": [
            "The cause of the error will be described here"
        ]
    }
}
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
CODE
$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);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.