Skip to main content
Skip table of contents

Archive generation. VMS Client API

This method is only used by the thick client.

The logic for the thick client and other clients is different.

The thick client directly downloads the archive from the media server.

This request returns a download link for the archive from the media server and creates a record in the history, which can be viewed, see Archive download list.

For all other clients, the logic is different. No record is created in the history, and no download link is returned. Everything happens asynchronously.

VMS downloads the archive to its own server and sends a push notification with a link to download the archive via WebSocket.

The archive is deleted from the disk if it has been there for more than 3 hours. The deletion is scheduled by a cron job running every 10 minutes.

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

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 ID for which the archive needs to be generated

fromrequired

date

Start date for the archive

torequired

date

End date for the archive

Response

200

Response for the decktop client

JSON
{"link": "https://host-name-1.domain.com/archive/download"}
401

Authorization token not provided or invalid

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}/archive/link?from=date&to=date' \
--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.