Skip to main content
Skip table of contents

Get the list of people counting events

List of people counting events

List of people counting events in the region.

GET /api/v1/analytic-case/{case}/person-counting/history

Parameters

int case, Unique identifier of the analytics case


int per_page, Number of elements in one pagination page.


string date, Template for filtering by date.


array cameras, Array of camera ids for which events will be displayed


string timezone, Time zone for the date filter template.


string from, Date from which filtering will be carried out.


string to, Date until which filtering will be carried out.

200 OK

Successful response

JSON
{
    "data": [
        {
            "camera": {
                "id": 746,
                "name": "Camera 1"
            },
            "created_at": "2022-04-07T15:18:38000000Z",
            "event": {
                "id": 28,
                "name": "person-counting",
                "description": "Count objects in an area",
                "color": "#1564A6",
                "analytic_type": "person-counting"
            },
            "person_count": 2,
            "crop": "base64content"
        }
    ],
    "links": {
        "first": "https://vms.local/api/v1/analytic-case/936/person-counting/history?per_page=24&page=1",
        "last": "https://vms.local/api/v1/analytic-case/936/person-counting/history?per_page=24&page=35",
        "prev": null,
        "next": "https://vms.local/api/v1/analytic-case/936/person-counting/history?per_page=24&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 35,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/v1/analytic-case/936/person-counting/history?per_page=24&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": "https://vms.local/api/v1/analytic-case/936/person-counting/history?per_page=24&page=2",
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v1/analytic-case/936/person-counting/history",
        "per_page": 24,
        "to": 24,
        "total": 827
    }
}

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/analytic-case/{case}/person-counting/history' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "case": 0,
    "per_page": 0,
    "date": "string",
    "cameras": [],
    "timezone": "string",
    "from": "string",
    "to": "string"
}'
PHP
PHP
$data = array (
  'case' => 0,
  'per_page' => 0,
  'date' => 'string',
  'cameras' => 
  array (
  ),
  'timezone' => 'string',
  'from' => 'string',
  'to' => '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/analytic-case/{case}/person-counting/history', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.