Skip to main content
Skip table of contents

Get the list of all cameras

Get the list of all cameras

Paginated list of all cameras available to the user. The camera field is_set_on_maps returns only with the filter=map parameter.

GET /api/v1/cameras

Parameters

int search, Search by camera address and name


int group_id, Filtering by camera location


array statuses, Filtering by status


int per_page, Number of elements in one pagination page.


int page, Pagination page number


string filter, Filtering the list of cameras ( analytics || map )


array exclude_ids, List of cameras that are not needed in the response


array top_list_ids, List of cameras that should be displayed at the top of the list


string cluster_key, Filtering cameras by location in a cluster on the map


boolean has_location, Filtering cameras, whether they have a location set or not.


boolean is_set_on_maps, Filtering cameras, added they on map and/or plan.

200 OK

Returns cameras on the i pagination page

JSON
{
    "data": [
        {
            "id": 894,
            "group_id": 190,
            "status": "inactive",
            "type": "media_server_v2",
            "start_at": "",
            "created_at": "2022-04-05 12:34:38",
            "billing_id": null,
            "pretty_name": "camera 2",
            "lat": null,
            "lng": null,
            "is_location_editable": true,
            "azimuth": null,
            "original_name": "camera 2",
            "pretty_text": "Region region, District district, City, street Street 1",
            "short_address": "City, street Street 1",
            "full_address": "Region region, District district, City, street Street 1",
            "streams": [
                {
                    "id": 923,
                    "type": "high",
                    "camera_id": 894,
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "status": "inactive",
                    "has_sound": false,
                    "width": null,
                    "height": null
                }
            ],
            "has_sound": false,
            "is_archive_recording": true,
            "is_bridge": false,
            "is_favorite": true,
            "user_status": "active",
            "name": "hik 3rd floor",
            "is_restricted_live": false,
            "is_restricted_archive": true,
            "is_set_on_maps": true
        },
        {
            "id": 837,
            "group_id": 124,
            "status": "active",
            "type": "media_server_v2",
            "start_at": "2022-06-06 17:24:12",
            "created_at": "2022-02-18 15:12:41",
            "billing_id": null,
            "pretty_name": "camera 2",
            "lat": null,
            "lng": null,
            "is_location_editable": true,
            "azimuth": null,
            "original_name": "camera 2",
            "pretty_text": "Region region, District district, City, street Street 1",
            "short_address": "City, street Street 1",
            "full_address": "Region region, District district, City, street Street 1",
            "streams": [
                {
                    "id": 844,
                    "type": "high",
                    "camera_id": 837,
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "status": "active",
                    "has_sound": true,
                    "width": 1280,
                    "height": 720
                },
                {
                    "id": 845,
                    "type": "low",
                    "camera_id": 837,
                    "is_preview_from_server": true,
                    "is_archive_from_server": null,
                    "status": "active",
                    "has_sound": true,
                    "width": 640,
                    "height": 360
                }
            ],
            "has_sound": true,
            "is_archive_recording": true,
            "is_bridge": false,
            "is_favorite": false,
            "user_status": "active",
            "name": "intercom 7",
            "is_restricted_live": false,
            "is_restricted_archive": true,
            "is_set_on_maps": false
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/cameras?page=1",
        "last": "https://vms.local/api/v1/cameras?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/v1/cameras?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v1/cameras",
        "per_page": 25,
        "to": 21,
        "total": 21
    }
}

401 Unauthorized

Authorization token not sent or not valid

422 Unprocessable Entity

Returns a JSON object with an error.

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 POST \
	--url 'https://your-domain/api/v1/cameras' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "search": 0,
    "group_id": 0,
    "statuses": [],
    "per_page": 0,
    "page": 0,
    "filter": "string",
    "exclude_ids": [],
    "top_list_ids": [],
    "cluster_key": "string",
    "has_location": "boolean",
    "is_set_on_maps": "boolean"
}'
PHP
PHP
$data = array (
  'search' => 0,
  'group_id' => 0,
  'statuses' => 
  array (
  ),
  'per_page' => 0,
  'page' => 0,
  'filter' => 'string',
  'exclude_ids' => 
  array (
  ),
  'top_list_ids' => 
  array (
  ),
  'cluster_key' => 'string',
  'has_location' => 'boolean',
  'is_set_on_maps' => 'boolean',
);
$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/cameras', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.