Skip to main content
Skip table of contents

List of events. VMS Client API

List of system events that a user can view

GET/api/v1/events

Headers

Authorization

Bearer token

Accept

application/json

X-Client

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

X-UUID

unique device id

Body

per_pagerequired

int

Number of items per pagination page. Default is 25

pagerequired

int

Pagination page number

daterequired

string

Template for filtering based on a specific date label. This field is mandatory when the «timezone» field is present

timezonerequired

string

Timezone for date filtering. Example: Europe/Paris. This field is mandatory when the «date» field is present

fromrequired

date

Starting date for displaying events

torequired

date

Ending date for displaying events

typerequired

array

Array of types. You can find the available list in Main configurations

camerasrequired

array

Array of camera IDs for which events are needed

sortrequired

string

Field to sort the labels

dirrequired

string

Direction in which to sort

Response

200

Successful response

JSON
{
            "data": [
                {
                    "id": null,
                    "type": "stream_high_active",
                    "type_pretty": "High-quality stream is active",
                    "data": [],
                    "camera": {
                        "id": 756,
                        "group_id": 101,
                        "status": "active",
                        "type": "media_server_v2",
                        "start_at": "2022-05-23 17:09:57",
                        "created_at": "2022-01-27 19:52:55",
                        "billing_id": null,
                        "pretty_name": "Camera 1",
                        "pretty_text": "Cameras",
                        "short_address": "Cameras",
                        "full_address": "Cameras",
                        "lat": null,
                        "lng": null,
                        "azimuth": null,
                        "streams": [
                            {
                                "id": 754,
                                "type": "high",
                                "camera_id": 756,
                                "is_preview_from_server": true,
                                "is_archive_from_server": null,
                                "status": "active",
                                "has_sound": false,
                                "width": 1920,
                                "height": 1080
                            },
                            {
                                "id": 755,
                                "type": "low",
                                "camera_id": 756,
                                "is_preview_from_server": true,
                                "is_archive_from_server": null,
                                "status": "active",
                                "has_sound": false,
                                "width": 640,
                                "height": 480
                            }
                        ],
                        "has_sound": false,
                        "is_archive_recording": true,
                        "is_bridge": false,
                        "is_favorite": false,
                        "user_status": "active",
                        "name": "Camera 1"
                    },
                    "camera_id": 756,
                    "user": null,
                    "user_id": null,
                    "created_at": "2022-06-07 05:20:05",
                    "analytic_case": null
                },
                {
                    "id": null,
                    "type": "stream_high_inactive",
                    "type_pretty": "High-quality stream is inactive",
                    "data": [],
                    "camera": {
                        "id": 756,
                        "group_id": 101,
                        "status": "active",
                        "type": "media_server_v2",
                        "start_at": "2022-05-23 17:09:57",
                        "created_at": "2022-01-27 19:52:55",
                        "billing_id": null,
                        "pretty_name": "Camera 1",
                        "pretty_text": "Cameras",
                        "short_address": "Cameras",
                        "full_address": "Cameras",
                        "lat": null,
                        "lng": null,
                        "azimuth": null,
                        "streams": [
                            {
                                "id": 754,
                                "type": "high",
                                "camera_id": 756,
                                "is_preview_from_server": true,
                                "is_archive_from_server": null,
                                "status": "active",
                                "has_sound": false,
                                "width": 1920,
                                "height": 1080
                            },
                            {
                                "id": 755,
                                "type": "low",
                                "camera_id": 756,
                                "is_preview_from_server": true,
                                "is_archive_from_server": null,
                                "status": "active",
                                "has_sound": false,
                                "width": 640,
                                "height": 480
                            }
                        ],
                        "services": {
                            "ptz": false,
                            "motion_detect": false
                        },
                        "has_sound": false,
                        "is_archive_recording": true,
                        "is_bridge": false,
                        "is_favorite": false,
                        "user_status": "active",
                        "name": "Camera 1"
                    },
                    "camera_id": 756,
                    "user": null,
                    "user_id": null,
                    "created_at": "2022-06-07 05:19:05",
                    "analytic_case": null
                }
            ],
            "links": {
                "first": "https://vms.local/api/v3/events?per_page=25&page=1",
                "last": "https://vms.local/api/v3/events?per_page=25&page=111",
                "prev": null,
                "next": "https://vms.local/api/v3/events?per_page=25&page=2"
            },
            "meta": {
                "current_page": 1,
                "from": 1,
                "last_page": 111,
                "links": [
                    {
                        "url": null,
                        "label": "pagination.previous",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=1",
                        "label": "1",
                        "active": true
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=2",
                        "label": "2",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=3",
                        "label": "3",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=4",
                        "label": "4",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=5",
                        "label": "5",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=6",
                        "label": "6",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=7",
                        "label": "7",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=8",
                        "label": "8",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=9",
                        "label": "9",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=10",
                        "label": "10",
                        "active": false
                    },
                    {
                        "url": null,
                        "label": "...",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=110",
                        "label": "110",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=111",
                        "label": "111",
                        "active": false
                    },
                    {
                        "url": "https://vms.local/api/v3/events?per_page=25&page=2",
                        "label": "pagination.next",
                        "active": false
                    }
                ],
                "path": "https://vms.local/api/v3/events",
                "per_page": 25,
                "to": 25,
                "total": 2762
            }
        }
401

Authorization token not provided or invalid

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"
        ]
    }
}

Пример

JSON
curl -k --location --request GET 'https://vms.local/api/v1/events?per_page=int&page=int&date=string&timezone=string&from=date&to=date&type=array&cameras=array&sort=string&dir=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.