Skip to main content
Skip table of contents

List of events. Visitor counting

Viewing the list of visitor counting events.

GET/api/v1/analytic-case/{case}/visitor-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

camerarequired

array

Array of camera IDs for which events will be displayed

agerequired

string

Age for filtering

sexrequired

string

Gender for filtering

steprequired

string

Filtering within a single day

daterequired

string

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

timezonerequired

string

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

fromrequired

string

Date from which the filtering will be applied. This field is required when there is no filtering by the «date» field

torequired

string

Date until which the filtering will be applied. This field is required when there is no filtering by the «date» field

Response

200

Returns a list of data for chart plotting

JSON
{
    "total": 153,
    "bar": {
        "labels": [
            "2022-04-07 07:00",
            "2022-04-07 08:00",
            "2022-04-07 09:00",
            "2022-04-07 10:00",
            "2022-04-07 11:00",
            "2022-04-07 12:00",
            "2022-04-07 13:00",
            "2022-04-07 14:00",
            "2022-04-07 15:00",
            "2022-04-07 16:00"
        ],
        "datasets": [
            {
                "label": "Office entrance",
                "data": [
                    5,
                    24,
                    28,
                    7,
                    7,
                    10,
                    27,
                    16,
                    17,
                    12
                ],
                "backgroundColor": "#F3D400"
            }
        ]
    },
    "sex": {
        "labels": [
            "Female",
            "Male",
            "Unrecognized"
        ],
        "datasets": [
            {
                "label": "Sex",
                "data": [
                    23,
                    69,
                    61
                ],
                "backgroundColor": [
                    "#FF4E84",
                    "#628BFF",
                    "#86EEFF"
                ]
            }
        ]
    },
    "age": {
        "labels": [
            "Under 18 years old",
            "18-30 years old",
            "30-45 years old",
            "45-60 years old",
            "60+ years old",
            "Unrecognized"
        ],
        "datasets": [
            {
                "label": "Age",
                "data": [
                    0,
                    10,
                    59,
                    23,
                    0,
                    61
                ],
                "backgroundColor": [
                    "#3B00FF",
                    "#628BFF",
                    "#B4C7FF",
                    "#FF4E84",
                    "#86EEFF",
                    "#6ec8e0"
                ]
            }
        ]
    }
}
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}/visitor-counting/history?camera=array&age=string&sex=string&step=string&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.