Skip to main content
Skip table of contents

Список скачиваний архива

Список скачиваний.

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

Количество элементов в одной странице пагинации. По умолчанию 25 штук

pagerequired

int

Номер страницы пагинации

fromrequired

date

С какой даты генерации архива возвращать данные (дата создания скачивания, а не с какой даты был скачен архива)

torequired

date

До какой даты генерации архива возвращать данные (дата создания скачивания, а не до какой даты был скачен архива)

Response

200

Успешный ответ

JSON
{
    "data": [
        {
            "id": 6414,
            "attributes": [],
            "name": "г. Город, ул. Улица 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",
            "status": "in progress",
            "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": "г. Город, ул. Улица 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",
            "status": "in progress",
            "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": "г. Город, ул. Улица 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",
            "status": "failed",
            "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": "г. Город, ул. Улица 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",
            "status": "completed",
            "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

Токен авторизации не передан или не валидный

422

Возвращает JSON объект с ошибкой, см. Валидация

JSON
{
    "message": "Тут не будет информативного сообщения",
    "errors": {
        "any_key": [
            "Тут будет описана причина ошибки"
        ]
    }
}

Пример

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.