Skip to main content
Skip table of contents

Flat map. VMS Admin API

Flat map

Returns all cameras within the specified coordinates.

If there are too many cameras in the map area, server-side clustering will occur.

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

Method 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

16 Unknown

CODE
{
    "id": 2,
    "name": "Camera 1",
    "short_address": "Folder 3, Folder 4",
    "latitude": 42.797159556908035,
    "longitude": -28.424838677853487,
    "azimuth": null
},
{
    "id": 3,
    "name": "Camera 2",
    "short_address": "Folder 1, Folder 2",
    "latitude": 32.797159556908035,
    "longitude": -28.424838677853487,
    "azimuth": 12
}

200 OK

Successful response with clustering

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

401 Unauthorized

Authorization token is not provided or is invalid. Obtaining a token

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
}'
PHP
PHP
$data = array (
  'bottom_left_latitude' => 'numeric',
  'bottom_left_longitude' => 'numeric',
  'top_right_latitude' => 'numeric',
  'top_right_longitude' => 'numeric',
  'zoom' => 0,
);
$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.