Skip to main content
Skip table of contents

Camera preview

By default, it returns a link to the live preview. However, if the «date» parameter is provided, it will return an archive preview. If «download=true» (as a string, because it is a GET parameter), it will return a download link with the «Content-Disposition» header set to «attachment». The «date» and «download» parameters can be combined. (The decktop client only uses archive previews.)

GET/api/v1/cameras/{camera}/preview

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

daterequired

datetime

Date for archive preview

downloadrequired

string

Flag to add the «Content-Disposition» header

Response

200

The preview link is available in the «preview» field, and the «is_need_token» field is used for Flussonic to add the user's bearer token (only used in web)

JSON
{"preview" : "http://domain.com/somepreview?token=sometoken", "is_need_token": false}
401

Authorization token not provided or invalid, see Obtaining a token

403

If access to the camera is temporarily blocked, a 403 error will be returned with the same response body as 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}/preview?date=datetime&download=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.