Skip to main content
Skip table of contents

Список медиасерверов

Список медиасерверов

GET /api/admin/v1/servers

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

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


string sort, поле, по которому нужно отсортировать сервера


string dir, в каком направлении нужно отсортировать. desc – от большего к меньшему, asc – от меньшего к большему


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

200 OK

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

JSON
{
    "data": [
        {
            "id": 1,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "host-name-1.vms.local",
            "external_domain": "host-name-1.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": true,
            "has_cache": null,
            "proxy": "host-name-1.vms.local",
            "created_at": "2022-09-22 12:19:28",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "host-name-1.vms.local"
                }
            },
            "cluster": {
                "id": 5,
                "name": "cluster 1",
                "type": "main_secondary",
                "internal": null,
                "external": null,
                "rtsp": null,
                "streams_limit": null,
                "bitrate_limit": null,
                "created_at": "2022-10-04 14:22:47",
                "updated_at": "2022-10-04 14:22:47",
                "pack": null
            },
            "is_editable": true,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 2,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "host-name-2.vms.local",
            "external_domain": "host-name-2.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": true,
            "has_cache": null,
            "proxy": "host-name-2.vms.local",
            "created_at": "2022-09-22 12:19:28",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "host-name-2.vms.local"
                }
            },
            "cluster": {
                "id": 5,
                "name": "cluster 1",
                "type": "main_secondary",
                "internal": null,
                "external": null,
                "rtsp": null,
                "streams_limit": null,
                "bitrate_limit": null,
                "created_at": "2022-10-04 14:22:47",
                "updated_at": "2022-10-04 14:22:47",
                "pack": null
            },
            "is_editable": true,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 3,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "host-name-3.vms.local",
            "external_domain": "host-name-3.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": true,
            "has_cache": null,
            "proxy": "host-name-3.vms.local",
            "created_at": "2022-09-22 12:19:28",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "host-name-3.vms.local"
                }
            },
            "cluster": {
                "id": 6,
                "name": "cluster 2",
                "type": "main_secondary",
                "internal": null,
                "external": null,
                "rtsp": null,
                "streams_limit": null,
                "bitrate_limit": null,
                "created_at": "2022-10-04 14:22:47",
                "updated_at": "2022-10-04 14:22:47",
                "pack": null
            },
            "is_editable": true,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 4,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "host-name-4.vms.local",
            "external_domain": "host-name-4.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": true,
            "has_cache": null,
            "proxy": "host-name-4.vms.local",
            "created_at": "2022-09-22 12:19:28",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "host-name-4.vms.local"
                }
            },
            "cluster": {
                "id": 6,
                "name": "cluster 2",
                "type": "main_qsecondary",
                "internal": null,
                "external": null,
                "rtsp": null,
                "streams_limit": null,
                "bitrate_limit": null,
                "created_at": "2022-10-04 14:22:47",
                "updated_at": "2022-10-04 14:22:47",
                "pack": null
            },
            "is_editable": true,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 5,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "host-name-5.vms.local",
            "external_domain": "host-name-5.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": true,
            "has_cache": null,
            "proxy": "host-name-5.vms.local",
            "created_at": "2022-09-22 12:19:28",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "host-name-5.vms.local"
                }
            },
            "cluster": null,
            "is_editable": true,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 6,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "host-name-6.vms.local",
            "external_domain": "host-name-6.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": true,
            "has_cache": null,
            "proxy": "host-name-6.vms.local",
            "created_at": "2022-09-22 12:19:28",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "host-name-6.vms.local"
                }
            },
            "cluster": null,
            "is_editable": true,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 7,
            "type": "media_server_v2",
            "schema": "https",
            "internal_domain": "mediaserver1.vms.local",
            "external_domain": "mediaserver1.vms.local",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": false,
            "has_cache": null,
            "proxy": "mediaserver1.vms.local",
            "created_at": "2022-10-04 14:16:06",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": false,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "mediaserver1.vms.local"
                }
            },
            "cluster": null,
            "is_editable": false,
            "is_have_incorrect_cameras": true
        },
        {
            "id": 8,
            "type": "flussonic",
            "schema": "https",
            "internal_domain": "flus.com",
            "external_domain": "flus.com",
            "domain": "host-name-1.vms.local",
            "internal": "8080",
            "external": "8443",
            "rtsp": "5554",
            "traffic_in": 0,
            "traffic_out": 0,
            "status": true,
            "is_enabled": false,
            "has_cache": false,
            "proxy": "mediaserver1.vms.local",
            "created_at": "2022-10-04 14:16:06",
            "updated_at": "2022-10-12 18:10:17",
            "group_type": "all",
            "can_delete": true,
            "streams_limit": 100,
            "bitrate_limit": 1000000,
            "extra": {
                "server": {
                    "hostname": "mediaserver1.vms.local"
                }
            },
            "cluster": null,
            "is_editable": false,
            "is_have_incorrect_cameras": true
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8000/api/admin/v1/servers?page=1",
        "last": "http://127.0.0.1:8000/api/admin/v1/servers?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:8000/api/admin/v1/servers?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8000/api/admin/v1/servers",
        "per_page": 25,
        "to": 8,
        "total": 8
    }
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/admin/v1/servers' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "per_page": 0,
    "sort": "string",
    "dir": "string",
    "page": 0
}'
PHP
PHP
$data = array (
  'per_page' => 0,
  'sort' => 'string',
  'dir' => 'string',
  'page' => 0,
);
$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/servers', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.