Skip to main content
Skip table of contents

List of events. Counting people in the area

View the list of people counting events in the area. The response will be provided based on the desired chart type.

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

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

caseoptional

int

Unique identifier of the analytics case

chartoptional

str

line - line chart

bar - bar chart

daterequired

int

Date for which the history is requested

camerasrequired

array

Array of camera IDs for which the events will be displayed

daterequired

string

Template for date filtering. This field is mandatory when there is no filtering by the «from» and «to» fields

timezonerequired

string

Timezone for date filtering. Example - Europe/Paris. This field is mandatory when filtering by date

fromrequired

string

Start date for filtering. This field is mandatory when there is no filtering by the «date» field

torequired

string

End date for filtering. This field is mandatory when there is no filtering by the «date» field

Response

200

Returns a list of data for building a line chart

JSON
{
    "labels": [
        "2022-04-07 10:00",
        "2022-04-07 10:30",
        "2022-04-07 12:40",
        "2022-04-07 13:00",
        "2022-04-07 14:10",
        "2022-04-07 14:20"
    ],
    "datasets": [
        {
            "label": "min",
            "data": [
                1,
                1,
                1,
                1,
                1,
                1
            ]
        },
        {
            "label": "average",
            "data": [
                1,
                1,
                1,
                1,
                1,
                1
            ]
        },
        {
            "label": "max",
            "data": [
                1,
                1,
                1,
                1,
                1,
                1
            ]
        }
    ]
}
200

Returns a list of data for building a bar chart

JSON
{
    "labels": [
        "2022-04-06 14:00",
        "2022-04-06 16:00",
        "2022-04-06 17:00",
        "2022-04-06 18:00",
        "2022-04-06 20:00",
        "2022-04-07 10:00",
        "2022-04-07 12:00",
        "2022-04-07 13:00",
        "2022-04-07 14:00"
    ],
    "datasets": [
        {
            "label": "Kitchen",
            "data": [
                1,
                1,
                1,
                1,
                1,
                1,
                1,
                1,
                1
            ],
            "backgroundColor": "#647483"
        }
    ]
}
401

Authorization token not provided or invalid, see Obtaining a token

422

Returns a JSON object with an error, see Validation

JSON
{
    "message": "There won't be any informative message here",
    "errors": {
        "any_key": [
            "Here the error cause will be described"
        ]
    }
}

Example

JSON
curl -k --location --request GET 'https://vms.local/api/v1/analytic-case/{case}/person-counting/history?date=int&cameras=array&date=string&timezone=string&from=string&to=string' \
--header 'Authorization:Bearer token' \
--header 'Accept:application/json' \
--header 'X-Client:ios-cctv|android-cctv|thick-legal|web' \
--header 'X-UUID:unique device id'
JavaScript errors detected

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

If this problem persists, please contact our support.