Skip to main content
Skip table of contents

Get the list of marks before or after a specific date

Get the list of marks before or after a specific date

Returns a sorted list of marks by date: from largest to smallest (from smallest to largest) before/after a specific date.

This refers to the order of dates. "Largest to smallest" means descending order (most recent to oldest), while "smallest to largest" means ascending order (oldest to most recent).

GET /api/v1/cameras/{camera}/marks/rewind

Parameters

int camera, Camera ID


date from, Date from which labels will be displayed


string rewind, If the value is next, then the labels created after from will be returned and will be sorted by date from smallest to largest.


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

200 OK

Successful response

JSON
{
    "mark": {
        "id": 1,
        "type": "mark",
        "type_pretty": "Custom",
        "title": "New Event",
        "can_delete": true,
        "from": "2023-11-30T07:45:57.000000Z",
        "to": null,
        "camera_id": 35,
        "created_at": "2023-11-30T07:55:03.000000Z",
        "updated_at": "2023-11-30T07:55:03.000000Z",
        "color": "#EDD500"
    }
}

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

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

If this problem persists, please contact our support.