Skip to main content
Skip table of contents

Getting links to view the archive

GET/api/v1/cameras/{camera}/streams/archive

Headers

Authorization

Bearer token

Accept

application/json

X-Client

ios-cctv|android-cctv|thick-legal|web

X-UUID

unique device id

Body

cameraoptional

int

Camera identifier

startrequired

string

Start date for archive viewing

durationrequired

int

Duration of the archive in seconds

sourcerequired

string

Stream type for which we want to obtain the URL

Response

200

The main URL is stored in the «url» field, while the «fallback_url» is used in the web if the player required for the URL is not available in the current browser. If the end date is earlier than the start date of the archive, the «move_to» field will contain a date to which the timeline should be adjusted, and the archive link will start from that date

JSON
{"url" : "http://domain.com/somestream?token=sometoken", "fallback_url": "http://domain.com/somestream?token=sometoken", "move_to": null}
401

Authorization token not provided or invalid, see Obtaining a token

403

If temporary access to the camera is blocked, an error with a 403 status code will be returned, with a response body similar to a 422 error

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/cameras/{camera}/streams/archive?start=string&duration=int&source=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.