Skip to main content
Skip table of contents

List of marks

List of markers available to the user. The types of available markers may vary depending on the client. The list of available markers for the client can be found in Main configurations

GET/api/v1/marks

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 by a specific date label. This field is mandatory when the timezone field is present

timezonerequired

string

Timezone for date filtering template. Example - Europe/Paris. This field is mandatory when the date field is present

fromrequired

date

Start date from which the markers will be displayed

torequired

date

End date until which the markers will be displayed

typesrequired

array

Only types from the types array will be included in the response. The list of available types can be found in Main configurations

camerasrequired

array

Only markers from cameras in the cameras array (array of camera IDs) will be included in the response. Maximum of 100 items

excluded_camerasrequired

array

Only markers from cameras not included in the excluded_cameras array (array of camera IDs) will be included in the response. Maximum of 100 items

sortrequired

string

Field to sort the markers by

dirrequired

string

Direction in which to sort the markers

Response

200

Successful response

JSON
{
            "data": [
                {
                    "id": 2,
                    "type": "mark",
                    "type_pretty": "Mark",
                    "title": "MARK",
                    "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,
                    "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": "Camera 1",
                        "pretty_text": "Cameras",
                        "short_address": "Cameras",
                        "full_address": "Cameras",
                        "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": "Camera 2"
                    },
                    "preview_url": "https://preview_url/screenshot.mp4?token=sometoken"
                },
                {
                    "id": 1,
                    "type": "mark",
                    "type_pretty": "Mark",
                    "title": "MARK",
                    "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,
                    "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": "Camera 3",
                        "pretty_text": "Cameras",
                        "short_address": "Cameras",
                        "full_address": "Cameras",
                        "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": "Camera 4"
                    },
                    "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

Authorization token not provided or invalid

403

If a requested marker type is not available to the current user

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/marks?per_page=int&page=int&date=string&timezone=string&from=date&to=date&types=array&cameras=array&excluded_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.