Skip to main content
Skip table of contents

Get a list of camera events

Getting a list of camera events

Getting a list of camera events.

Permission for this route - events-index

GET /api/admin/v1/cameras/{camera}/events

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

int camera, Unique camera identifier


int per_page, Number of elements in one pagination page.


int page, Pagination page number


string sort, Sorting parameter.


string dir, In which direction to sort.


date from, Start date.


date to, End date.


array types, Event types


string group REQUIRED, Group of camera events. Available values: camera_logs, system_camera_events, camera_events


array users, List of user ids.


array user_types, User types.

200 OK

Successful response

JSON
{
    "data": [
        {
            "type": "special.camera.store_favorite",
            "type_pretty": "Add camera to favorites by temporary user",
            "data": {
                "test": 123
            },
            "count": null,
            "user": {
                "id": 13,
                "name": "user",
                "login": "user@mail.com",
                "created_at": "2023-04-17T15:16:27.000000Z",
                "updated_at": "2023-07-24T12:19:32.000000Z",
                "expired_at": "2024-05-19T13:06:39.000000Z",
                "user_type": "admin",
                "parent_id": null,
                "is_system": 0,
                "is_licence_limit_reached": true,
                "ptz_priority": 10,
                "access_token_id": null
            },
            "created_at": "2023-11-22T13:11:48.000000Z",
            "updated_at": "2023-11-22T13:11:49.000000Z",
            "camera": {
                "id": 28,
                "group_id": 6,
                "status": "active",
                "type": "flussonic",
                "start_at": null,
                "created_at": "2023-04-17T15:16:16.000000Z",
                "billing_id": null,
                "pretty_name": "fake stream 3",
                "original_name": "fake stream 3",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "is_archive_recording": false,
                "archive_recording_type": "fulltime",
                "can_change_archive_timetable": false,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "fake stream 3"
            }
        }
    ],
    "links": {
        "first": "https://vms.local:8000/api/admin/v1/events?group=user_logs&camera_ids%5B0%5D=28&page=1",
        "last": "https://vms.local:8000/api/admin/v1/events?group=user_logs&camera_ids%5B0%5D=28&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local:8000/api/admin/v1/events?group=user_logs&camera_ids%5B0%5D=28&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local:8000/api/admin/v1/events",
        "per_page": 25,
        "to": 1,
        "total": 1
    }
}

401 Unauthorized

Authorization token not sent or not valid

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/cameras/{camera}/events' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "camera": 0,
    "per_page": 0,
    "page": 0,
    "sort": "string",
    "dir": "string",
    "from": "date",
    "to": "date",
    "types": [],
    "group": "string",
    "users": [],
    "user_types": []
}'
PHP
PHP
$data = array (
  'camera' => 0,
  'per_page' => 0,
  'page' => 0,
  'sort' => 'string',
  'dir' => 'string',
  'from' => 'date',
  'to' => 'date',
  'types' => 
  array (
  ),
  'group' => 'string',
  'users' => 
  array (
  ),
  'user_types' => 
  array (
  ),
);
$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/admin/v1/cameras/{camera}/events', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.