Skip to main content
Skip table of contents

Список фрагментов архива

Список фрагментов архива

GET /api/admin/v1/downloads

Параметры метода

string from, дата, от которой будет генерироваться архив


string to, дата, до которой будет генерироваться архив


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


int page, номер страницы пагинации


string search, поиск осуществляется по названию сервера и ip

200 OK

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

JSON
{
    "data": [
        {
            "name": "г. Город, ул. Улица 1, file.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,
                "status": null,
                "url": "rtsp://admin:456redko@192.168.204.13:554/Streaming/Channels/101",
                "bitrate": null,
                "resolution": null,
                "output_rate": null,
                "ip": "192.168.204.13",
                "uuid": "fecb93a5-0c0e-4515-9115-633c45994b29",
                "sound": null,
                "streams_count": null,
                "created_at": "2023-02-03T08:29:06.000000Z",
                "updated_at": "2023-02-03T08:29:06.000000Z",
                "is_preview_from_server": true,
                "is_archive_from_server": null,
                "is_enabled": true,
                "is_can_transfer": true,
                "source": "manual",
                "is_sound_enabled": null,
                "reconnect_attempt": null,
                "reconnect_total": null,
                "reconnect_time": null,
                "disconnections_count": 0,
                "camera": {
                    "id": 1,
                    "group_id": 2,
                    "status": "initial",
                    "type": "media_server_v2",
                    "start_at": null,
                    "created_at": "2023-02-03T08:29:06.000000Z",
                    "name": "Камера 1",
                    "can_edit": true,
                    "origin": null,
                    "user_type": "individual",
                    "shared_from": null,
                    "ip": "192.168.204.13",
                    "lat": null,
                    "lng": null,
                    "azimuth": null,
                    "is_sensitive": 0,
                    "is_public": 0,
                    "is_ip_reserved": false,
                    "count_issues": 0,
                    "source": "manual",
                    "archive_storage_days": null,
                    "is_archive_recording": false,
                    "archive_recording_type": "fulltime",
                    "is_increased_reconnect": 0,
                    "is_sound_enabled": true,
                    "is_bridge": false,
                    "can_change_archive_timetable": true,
                    "is_auto_create_streams": false,
                    "is_provisioning_enable": false,
                    "is_can_manage_archive_storage_days": true,
                    "is_editable": true,
                    "status_changed_at": null,
                    "is_intercom": false,
                    "deleted_at": null
                },
                "is_actual": true,
                "condition": "active",
                "stopped_at": ""
            }
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8080/api/admin/v1/downloads?page=1",
        "last": "http://127.0.0.1:8080/api/admin/v1/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/admin/v1/downloads?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8080/api/admin/v1/downloads",
        "per_page": 25,
        "to": 4,
        "total": 4
    }
}

200 is_file_exists

Присутствует ли файл на платформе. В случае, если он отсутствует, то можно скачать повторно

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/downloads' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "from": "string",
    "to": "string",
    "per_page": 0,
    "page": 0,
    "search": "string"
}'
PHP
PHP
$data = array (
  'from' => 'string',
  'to' => 'string',
  'per_page' => 0,
  'page' => 0,
  'search' => 'string',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'GET',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/admin/v1/downloads', false, $context);
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.