Skip to main content
Skip table of contents

The camera map

The camera map

Gives all cameras within the specified coordinates If there are too many cameras in the map area, then server clustering will occur

In a request, when cameras are grouped, there is a key field that can be sent in the request VMS Admin/Working with cameras/Displaying cameras/Search in the cluster_key field to get a paginated list of cameras within a given cluster.

GET /api/admin/v1/map/cameras/

Parameters

numeric bottom_left_latitude, Latitude coordinate of the bottom left point


numeric bottom_left_longitude, Longitude coordinate of the bottom left point


numeric top_right_latitude, Latitude coordinate of the top right point


numeric top_right_longitude, Longitude coordinate of the top right point


int zoom, Current zoom level on the map


array statuses, Camera status. Possible values (active, inactive, partial, initial, empty)

200 OK

Successful response with clustering

JSON
{
    "grouped": true,
    "items": [
        {
            "latitude": 52.797159556908035,
            "longitude": -28.424838677853487,
            "count": 3086,
            "key": "u9h"
        },
        {
            "latitude": 42.797159556908035,
            "longitude": -28.424838677853487,
            "count": 7600,
            "key": "u9k"
        },
        {
            "latitude": 32.797159556908035,
            "longitude": -28.424838677853487,
            "count": 3629,
            "key": "u8k"
        }
    ]
}

200 OK

JSON
{
    "grouped": false,
    "items": [
        {
            "id": 1,
            "name": "Camera 1",
            "short_address": "Folder 1, Folder 2",
            "latitude": 52.797159556908035,
            "longitude": -28.424838677853487,
            "azimuth": 34.16,
            "status": "active"
        },
        {
            "id": 2,
            "name": "Camera 2",
            "short_address": "Folder 3, Folder 4",
            "latitude": 42.797159556908035,
            "longitude": -28.424838677853487,
            "azimuth": null,
            "status": "active"
        },
        {
            "id": 3,
            "name": "Camera 3",
            "short_address": "Folder 1, Folder 2",
            "latitude": 32.797159556908035,
            "longitude": -28.424838677853487,
            "azimuth": 12,
            "status": "active"
        }
    ]
}

401 Unauthorized

Authorization token not sent or not valid

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/map/cameras/' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "bottom_left_latitude": "numeric",
    "bottom_left_longitude": "numeric",
    "top_right_latitude": "numeric",
    "top_right_longitude": "numeric",
    "zoom": 0,
    "statuses": []
}'
PHP
PHP
$data = array (
  'bottom_left_latitude' => 'numeric',
  'bottom_left_longitude' => 'numeric',
  'top_right_latitude' => 'numeric',
  'top_right_longitude' => 'numeric',
  'zoom' => 0,
  'statuses' => 
  array (
  ),
);
$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/map/cameras/', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.