Skip to main content
Skip table of contents

Archive download list

List of downloads.

GET/api/v1/downloads

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 page in pagination. Default value is 25

pagerequired

int

Page number in pagination

fromrequired

date

From which date of archive generation to return data (download creation date, not the date the archive was downloaded)

torequired

date

To which date of archive generation to return data (download creation date, not the date the archive was downloaded)

Response

200

Successful response

JSON
{
    "data": [
        {
            "id": 6414,
            "attributes": [],
            "name": "City , st. Street 1, file.20190924-130316-131213.mp4",
            "type": "mp4",
            "url": "http://127.0.0.1:8080/storage/",
            "from": "2019-09-24 13:03:16",
            "to": "2019-09-24 13:12:13",
            "created_at": "2019-09-24T13:54:44.000000Z",
            "updated_at": "2023-02-10T15:09:25.000000Z",
            "is_file_exists": true,
            "stream": {
                "id": 2,
                "type": "low",
                "camera_id": 1,
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "status": null,
                "has_sound": false,
                "width": null,
                "height": null
            },
            "user_id": 5,
            "user": {
                "id": 5,
                "login": "user@mail.com",
                "name": "user",
                "parent_id": 3,
                "created_at": "2023-02-03T08:29:07.000000Z",
                "updated_at": "2023-02-06T09:19:35.000000Z",
                "access_token_id": null,
                "can_update_password": true
            }
        },
        {
            "id": 6416,
            "attributes": [],
            "name": "City , st. Street 1, file.20190924-130316-131213.mp4",
            "type": "mp4",
            "url": "http://127.0.0.1:8080/storage/",
            "from": "2019-09-24 13:03:16",
            "to": "2019-09-24 13:12:13",
            "created_at": "2019-09-24T13:54:44.000000Z",
            "updated_at": "2023-02-10T15:09:25.000000Z",
            "is_file_exists": true,
            "stream": {
                "id": 2,
                "type": "low",
                "camera_id": 1,
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "status": null,
                "has_sound": false,
                "width": null,
                "height": null
            },
            "user_id": 5,
            "user": {
                "id": 5,
                "login": "user@mail.com",
                "name": "user",
                "parent_id": 3,
                "created_at": "2023-02-03T08:29:07.000000Z",
                "updated_at": "2023-02-06T09:19:35.000000Z",
                "access_token_id": null,
                "can_update_password": true
            }
        },
        {
            "id": 6413,
            "attributes": [],
            "name": "City , st. Street 1, file.20190920-161320-162227.mp4",
            "type": "mp4",
            "url": "http://127.0.0.1:8080/storage/",
            "from": "2019-09-20 16:13:20",
            "to": "2019-09-20 16:22:27",
            "created_at": "2019-09-20T17:00:00.000000Z",
            "updated_at": "2023-02-10T15:09:25.000000Z",
            "is_file_exists": true,
            "stream": {
                "id": 1,
                "type": "high",
                "camera_id": 1,
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "status": null,
                "has_sound": false,
                "width": null,
                "height": null
            },
            "user_id": 5,
            "user": {
                "id": 5,
                "login": "user@mail.com",
                "name": "user",
                "parent_id": 3,
                "created_at": "2023-02-03T08:29:07.000000Z",
                "updated_at": "2023-02-06T09:19:35.000000Z",
                "access_token_id": null,
                "can_update_password": true
            }
        },
        {
            "id": 6415,
            "attributes": [],
            "name": "City , st. Street 1, file.20190920-161320-162227.mp4",
            "type": "mp4",
            "url": "http://127.0.0.1:8080/storage/",
            "from": "2019-09-20 16:13:20",
            "to": "2019-09-20 16:22:27",
            "created_at": "2019-09-20T17:00:00.000000Z",
            "updated_at": "2023-02-10T15:09:25.000000Z",
            "is_file_exists": true,
            "stream": {
                "id": 1,
                "type": "high",
                "camera_id": 1,
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "status": null,
                "has_sound": false,
                "width": null,
                "height": null
            },
            "user_id": 5,
            "user": {
                "id": 5,
                "login": "user@mail.com",
                "name": "user",
                "parent_id": 3,
                "created_at": "2023-02-03T08:29:07.000000Z",
                "updated_at": "2023-02-06T09:19:35.000000Z",
                "access_token_id": null,
                "can_update_password": true
            }
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8080/api/v1/users/downloads?page=1",
        "last": "http://127.0.0.1:8080/api/v1/users/downloads?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "http://127.0.0.1:8080/api/v1/users/downloads?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8080/api/v1/users/downloads",
        "per_page": 25,
        "to": 4,
        "total": 4
    }
}
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/downloads?per_page=int&page=int&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.