Skip to main content
Skip table of contents

Get the list of system events

List of system events

List of system events that the user can view

GET /api/v1/events

Параметры метода

int per_page, Number of elements in one pagination page.


int page, Pagination page number


string date, Pattern to filter by a specific date stamp.


string timezone, Time zone for filtering template by date.


date from, Date from which events will be displayed


date to, Date until which events will be displayed


string type, Array of types, list of available ones can be found


array cameras, Array of camera IDs for which events are needed


string sort, The field by which to sort the labels


string dir, In which direction to sort.


string group, Filtering by event group. Possible values - systems, cameras, externals, bridges


string move_to, UUID of the event to redirect on the pagination page where this event is located

200 OK

Successful response

JSON
{
    "data": [
        {
            "id": null,
            "type": "stream_high_active",
            "type_pretty": "High quality stream active",
            "data": [],
            "color": "#00A670",
            "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": "Fence (containers)",
                "pretty_text": "Original cameras, Outdoor cameras",
                "short_address": "Source cameras, Outdoor cameras",
                "full_address": "Original cameras, Outdoor 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": "Fence (containers)"
            },
            "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": [],
            "color": "#F30000",
            "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": "Fence (containers)",
                "pretty_text": "Original cameras, Outdoor cameras",
                "short_address": "Source cameras, Outdoor cameras",
                "full_address": "Original cameras, Outdoor 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": "Fence (containers)"
            },
            "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 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/events' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "page": 0,
    "date": "string",
    "timezone": "string",
    "from": "date",
    "to": "date",
    "type": "string",
    "cameras": [],
    "sort": "string",
    "dir": "string",
    "group": "string",
    "move_to": "string"
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'page' => 0,
  'date' => 'string',
  'timezone' => 'string',
  'from' => 'date',
  'to' => 'date',
  'type' => 'string',
  'cameras' => 
  array (
  ),
  'sort' => 'string',
  'dir' => 'string',
  'group' => 'string',
  'move_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/events', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.