Skip to main content
Skip table of contents

Get the list of marks

Get the list of marks

List of tags available to the user.

GET /api/v1/marks

Parameters

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. Available values: today, yesterday, week, 28days, 30days, year.


string timezone, Time zone for filtering template by date.


date from, Date from which labels will be displayed


date to, Date until which labels will be displayed


array types, Only types from the types array will be in the response.


array cameras, Only camera labels from the cameras array (camera id array) will be in the response.


array excluded_cameras, Only labels of cameras not included in the excluded_cameras array (array of camera ids) will be in the response.


string sort, The field by which to sort the labels


string dir, In which direction to sort.


int move_to, ID of the mark to redirect on the pagination page where this mark is located

200 OK

Successful response

JSON
{
    "data": [
        {
            "id": 2,
            "type": "mark",
            "type_pretty": "Custom",
            "title": "TEST MARK 2",
            "can_delete": true,
            "from": "2023-04-18T14:14:49.000000Z",
            "to": "2023-04-18T18:14:53.000000Z",
            "camera_id": 28,
            "created_at": "2023-04-18T15:14:59.000000Z",
            "updated_at": null,
            "color": "#EDD500",
            "camera": {
                "id": 28,
                "group_id": 7,
                "status": "active",
                "type": "media_server_v2",
                "start_at": null,
                "created_at": "2023-04-17T15:16:16.000000Z",
                "billing_id": null,
                "pretty_name": "fake stream 3",
                "pretty_text": "Test cameras, fake stream",
                "short_address": "Test cameras, fake stream",
                "full_address": "Test cameras, fake stream",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "streams": [
                    {
                        "id": 49,
                        "type": "high",
                        "camera_id": 28,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": false,
                        "width": null,
                        "height": null
                    }
                ],
                "has_sound": false,
                "is_archive_recording": false,
                "archive_recording_type": "fulltime",
                "can_change_archive_timetable": false,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "test camera 2"
            },
            "preview_url": "https://preview_url/screenshot.mp4?token=sometoken"
        },
        {
            "id": 1,
            "type": "mark",
            "type_pretty": "Custom",
            "title": "TEST MARK 1",
            "can_delete": true,
            "from": "2023-04-18T15:14:01.000000Z",
            "to": "2023-04-18T16:14:04.000000Z",
            "camera_id": 27,
            "created_at": "2023-04-18T15:14:08.000000Z",
            "updated_at": null,
            "color": "#EDD500",
            "camera": {
                "id": 27,
                "group_id": 7,
                "status": "active",
                "type": "media_server_v2",
                "start_at": null,
                "created_at": "2023-04-17T15:16:16.000000Z",
                "billing_id": null,
                "pretty_name": "fake stream 2",
                "pretty_text": "Test cameras, fake stream",
                "short_address": "Test cameras, fake stream",
                "full_address": "Test cameras, fake stream",
                "lat": null,
                "lng": null,
                "azimuth": null,
                "streams": [
                    {
                        "id": 48,
                        "type": "high",
                        "camera_id": 27,
                        "is_preview_from_server": true,
                        "is_archive_from_server": null,
                        "status": "active",
                        "has_sound": false,
                        "width": null,
                        "height": null
                    }
                ],
                "has_sound": false,
                "is_archive_recording": false,
                "archive_recording_type": "fulltime",
                "can_change_archive_timetable": false,
                "is_bridge": false,
                "is_favorite": false,
                "user_status": "active",
                "name": "test camera 1"
            },
            "preview_url": "https://preview_url/screenshot.mp4?token=sometoken"
        }
    ],
    "links": {
        "first": "https://vms.local/api/v3/marks?per_page=25&page=1",
        "last": "https://vms.local/api/v3/marks?per_page=25&page=255",
        "prev": null,
        "next": "https://vms.local/api/v3/marks?per_page=25&page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/v3/marks?per_page=25&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/v3/marks",
        "per_page": 25,
        "to": 2,
        "total": 2
    }
}

401 Unauthorized

Authorization token not sent or not valid

403 Forbidden

If you requested a label type that is not available to the current user

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/marks' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "page": 0,
    "date": "string",
    "timezone": "string",
    "from": "date",
    "to": "date",
    "types": [],
    "cameras": [],
    "excluded_cameras": [],
    "sort": "string",
    "dir": "string",
    "move_to": 0
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'page' => 0,
  'date' => 'string',
  'timezone' => 'string',
  'from' => 'date',
  'to' => 'date',
  'types' => 
  array (
  ),
  'cameras' => 
  array (
  ),
  'excluded_cameras' => 
  array (
  ),
  'sort' => 'string',
  'dir' => 'string',
  'move_to' => 0,
);
$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/marks', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.