Skip to main content
Skip table of contents

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

Получение списка кластеров медиасерверов

GET /api/admin/v1/clusters

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

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


string without_packs, без пакетов


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

200 OK

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

JSON
{
    "data": [
        {
            "id": 3,
            "name": "Кластер 3",
            "type": "main-secondary",
            "internal": 555,
            "external": 555,
            "m4f": 555,
            "rtsp": 555,
            "publish": 555,
            "streams_limit": 6000,
            "bitrate_limit": 600000,
            "created_at": "2021-05-27 17:14:48",
            "updated_at": "2021-11-26 20:16:40",
            "servers": [
                {
                    "id": 5,
                    "type": "media_server_v2",
                    "schema": "https",
                    "domain": "labMS7.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "m4f": "8443",
                    "rtsp": "5554",
                    "publish": "555",
                    "traffic_in": 7909,
                    "traffic_out": 504,
                    "status": 1,
                    "is_enabled": 1,
                    "is_main": 0,
                    "has_cache": 0,
                    "proxy": "vms.local",
                    "created_at": "2021-05-27 16:16:26",
                    "updated_at": "2022-05-26 16:58:02",
                    "group_type": "all",
                    "can_delete": false,
                    "streams_limit": 6000,
                    "bitrate_limit": 600000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 12,
                            "usage": 4,
                            "stime_sec": 1908,
                            "utime_sec": 1908
                        },
                        "mem": {
                            "rss": 202911744,
                            "share": 9650176,
                            "usage": 2444365824
                        },
                        "net": {
                            "in_bitrate": 8098408,
                            "out_bitrate": 516168
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1438962,
                                "inode_total": 1605632,
                                "capacity_free": 18049687552,
                                "capacity_total": 25759584256
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 65216,
                                "inode_total": 65536,
                                "capacity_free": 704004096,
                                "capacity_total": 1023303680
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32757660,
                                "inode_total": 32768000,
                                "capacity_free": 118305087488,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.19",
                            "name": "MS-21.03-lts",
                            "build": "7c80c1d",
                            "uptime": 104759,
                            "startat": 1653468723,
                            "version": "21.03",
                            "hostname": "labMS7.vms.local",
                            "revision": "lts",
                            "timestamp": "20220524110654"
                        },
                        "cluster": {
                            "id": "3",
                            "node": "7",
                            "enable": "true",
                            "hostname": "labMS7.vms.local"
                        },
                        "license": {
                            "own": "Vms",
                            "type": "enterprise",
                            "issued": 1685109482
                        },
                        "streams": {
                            "total": 21,
                            "active": 3,
                            "clients": 0
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32757660,
                                "inode_total": 32768000,
                                "capacity_free": 118305087488,
                                "capacity_total": 527371075584
                            }
                        }
                    }
                },
                {
                    "id": 6,
                    "type": "media_server_v2",
                    "schema": "https",
                    "domain": "labMS8.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "m4f": "8443",
                    "rtsp": "5554",
                    "publish": "555",
                    "traffic_in": 36693,
                    "traffic_out": 5928,
                    "status": 1,
                    "is_enabled": 1,
                    "is_main": 0,
                    "has_cache": 0,
                    "proxy": ".vms.local",
                    "created_at": "2021-05-27 16:17:06",
                    "updated_at": "2022-05-26 16:58:02",
                    "group_type": "all",
                    "can_delete": false,
                    "streams_limit": 6000,
                    "bitrate_limit": 600000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 23,
                            "usage": 24,
                            "stime_sec": 8897,
                            "utime_sec": 8897
                        },
                        "mem": {
                            "rss": 844484608,
                            "share": 10190848,
                            "usage": 2827206656
                        },
                        "net": {
                            "in_bitrate": 37573728,
                            "out_bitrate": 6070704
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1472963,
                                "inode_total": 1605632,
                                "capacity_free": 18250747904,
                                "capacity_total": 25759584256
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 65220,
                                "inode_total": 65536,
                                "capacity_free": 807084032,
                                "capacity_total": 1023303680
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32719546,
                                "inode_total": 32768000,
                                "capacity_free": 16777216,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.20",
                            "name": "MS-21.03-lts",
                            "build": "7c80c1d",
                            "uptime": 104759,
                            "startat": 1653468723,
                            "version": "21.03",
                            "hostname": "labMS8.vms.local",
                            "revision": "lts",
                            "timestamp": "20220524110654"
                        },
                        "cluster": {
                            "id": "3",
                            "node": "8",
                            "enable": "true",
                            "hostname": "labMS8.vms.local"
                        },
                        "license": {
                            "own": "Vms",
                            "type": "enterprise",
                            "issued": 1685109482
                        },
                        "streams": {
                            "total": 22,
                            "active": 16,
                            "clients": 3
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32719546,
                                "inode_total": 32768000,
                                "capacity_free": 16777216,
                                "capacity_total": 527371075584
                            }
                        }
                    }
                }
            ]
        },
        {
            "id": 2,
            "name": "Кластер 2",
            "type": "main-secondary",
            "internal": null,
            "external": null,
            "m4f": null,
            "rtsp": null,
            "publish": null,
            "streams_limit": null,
            "bitrate_limit": null,
            "created_at": "2021-05-27 17:14:37",
            "updated_at": "2021-05-27 17:14:37",
            "servers": [
                {
                    "id": 3,
                    "type": "media_server_v2",
                    "schema": "https",
                    "domain": "labMS5.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "m4f": "8443",
                    "rtsp": "5554",
                    "publish": "7554",
                    "traffic_in": 11565,
                    "traffic_out": 3737,
                    "status": 1,
                    "is_enabled": 0,
                    "is_main": 0,
                    "has_cache": 0,
                    "proxy": ".vms.local",
                    "created_at": "2021-05-27 16:15:02",
                    "updated_at": "2022-05-26 16:58:02",
                    "group_type": "all",
                    "can_delete": false,
                    "streams_limit": 1000,
                    "bitrate_limit": 60000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 16,
                            "usage": 9,
                            "stime_sec": 4793,
                            "utime_sec": 4793
                        },
                        "mem": {
                            "rss": 362352640,
                            "share": 10448896,
                            "usage": 2465751040
                        },
                        "net": {
                            "in_bitrate": 11842832,
                            "out_bitrate": 3826968
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1480145,
                                "inode_total": 1605632,
                                "capacity_free": 19124428800,
                                "capacity_total": 25759584256
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 65220,
                                "inode_total": 65536,
                                "capacity_free": 807088128,
                                "capacity_total": 1023303680
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32754216,
                                "inode_total": 32768000,
                                "capacity_free": 229881782272,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.17",
                            "name": "MS-21.03-lts",
                            "build": "7c80c1d",
                            "uptime": 104760,
                            "startat": 1653468722,
                            "version": "21.03",
                            "hostname": "labMS5.vms.local",
                            "revision": "lts",
                            "timestamp": "20220524110654"
                        },
                        "cluster": {
                            "id": "2",
                            "node": "5",
                            "enable": "true",
                            "hostname": "labMS5.vms.local"
                        },
                        "license": {
                            "own": "Vms",
                            "type": "enterprise",
                            "issued": 1685109482
                        },
                        "streams": {
                            "total": 36,
                            "active": 10,
                            "clients": 1
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32754216,
                                "inode_total": 32768000,
                                "capacity_free": 229881782272,
                                "capacity_total": 527371075584
                            }
                        }
                    }
                },
                {
                    "id": 4,
                    "type": "media_server_v2",
                    "schema": "https",
                    "domain": "labMS6.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "m4f": "8443",
                    "rtsp": "5554",
                    "publish": "7554",
                    "traffic_in": 27751,
                    "traffic_out": 17176,
                    "status": 1,
                    "is_enabled": 1,
                    "is_main": 0,
                    "has_cache": 0,
                    "proxy": ".vms.local",
                    "created_at": "2021-05-27 16:15:44",
                    "updated_at": "2022-05-26 16:58:02",
                    "group_type": "all",
                    "can_delete": false,
                    "streams_limit": 1000,
                    "bitrate_limit": 60000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 18,
                            "usage": 20,
                            "stime_sec": 11357,
                            "utime_sec": 11357
                        },
                        "mem": {
                            "rss": 881221632,
                            "share": 10752000,
                            "usage": 4586233856
                        },
                        "net": {
                            "in_bitrate": 28416600,
                            "out_bitrate": 17588640
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1441415,
                                "inode_total": 1605632,
                                "capacity_free": 18403303424,
                                "capacity_total": 25759584256
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 65216,
                                "inode_total": 65536,
                                "capacity_free": 703995904,
                                "capacity_total": 1023303680
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32750967,
                                "inode_total": 32768000,
                                "capacity_free": 16777216,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.18",
                            "name": "MS-21.03-lts",
                            "build": "7c80c1d",
                            "uptime": 104759,
                            "startat": 1653468723,
                            "version": "21.03",
                            "hostname": "labMS6.vms.local",
                            "revision": "lts",
                            "timestamp": "20220524110654"
                        },
                        "cluster": {
                            "id": "2",
                            "node": "6",
                            "enable": "true",
                            "hostname": "labMS6.vms.local"
                        },
                        "license": {
                            "own": "Vms",
                            "type": "enterprise",
                            "issued": 1685109482
                        },
                        "streams": {
                            "total": 36,
                            "active": 14,
                            "clients": 13
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32750967,
                                "inode_total": 32768000,
                                "capacity_free": 16777216,
                                "capacity_total": 527371075584
                            }
                        }
                    }
                }
            ]
        },
        {
            "id": 1,
            "name": "Кластер 1",
            "type": "main-secondary",
            "internal": null,
            "external": null,
            "m4f": null,
            "rtsp": null,
            "publish": null,
            "streams_limit": null,
            "bitrate_limit": null,
            "created_at": "2021-05-27 17:14:21",
            "updated_at": "2021-12-29 13:11:13",
            "servers": [
                {
                    "id": 1,
                    "type": "media_server_v2",
                    "schema": "https",
                    "domain": "labMS3.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "m4f": "8443",
                    "rtsp": "5554",
                    "publish": "7554",
                    "traffic_in": 30577,
                    "traffic_out": 49870,
                    "status": 1,
                    "is_enabled": 1,
                    "is_main": 1,
                    "has_cache": 0,
                    "proxy": ".vms.local",
                    "created_at": "2021-05-27 16:07:46",
                    "updated_at": "2022-05-26 16:58:02",
                    "group_type": "all",
                    "can_delete": false,
                    "streams_limit": 1000,
                    "bitrate_limit": 600000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 12,
                            "usage": 7,
                            "stime_sec": 167,
                            "utime_sec": 167
                        },
                        "mem": {
                            "rss": 554659840,
                            "share": 10706944,
                            "usage": 2749591552
                        },
                        "net": {
                            "in_bitrate": 31310768,
                            "out_bitrate": 51066864
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1464407,
                                "inode_total": 1589248,
                                "capacity_free": 15008972800,
                                "capacity_total": 25491165184
                            },
                            "none": {
                                "fs": "swap",
                                "mount": "none",
                                "inode_free": 0,
                                "inode_total": 0,
                                "capacity_free": 0,
                                "capacity_total": 0
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 97988,
                                "inode_total": 98304,
                                "capacity_free": 1333460992,
                                "capacity_total": 1551745024
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32749801,
                                "inode_total": 32768000,
                                "capacity_free": 16777216,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.15",
                            "name": "MS-21.03-lts",
                            "build": "7c80c1d",
                            "uptime": 5279,
                            "startat": 1653568203,
                            "version": "21.03",
                            "hostname": "labMS3.vms.local",
                            "revision": "lts",
                            "timestamp": "20220524110654"
                        },
                        "cluster": {
                            "id": "100",
                            "node": "3",
                            "enable": "true",
                            "hostname": "labMS3.vms.local"
                        },
                        "license": {
                            "own": "Vms",
                            "type": "enterprise",
                            "issued": 1685109482
                        },
                        "streams": {
                            "total": 54,
                            "active": 17,
                            "clients": 18
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32749801,
                                "inode_total": 32768000,
                                "capacity_free": 16777216,
                                "capacity_total": 527371075584
                            },
                            "/storage2": {
                                "fs": "",
                                "err": -2,
                                "name": "secondary",
                                "mount": "/storage2",
                                "inode_free": 0,
                                "inode_total": 0,
                                "capacity_free": 0,
                                "capacity_total": 0
                            }
                        }
                    }
                },
                {
                    "id": 2,
                    "type": "media_server_v2",
                    "schema": "https",
                    "domain": "labMS4.vms.local",
                    "internal": "8080",
                    "external": "8443",
                    "m4f": "8443",
                    "rtsp": "5554",
                    "publish": "7554",
                    "traffic_in": 22934,
                    "traffic_out": 2169,
                    "status": 1,
                    "is_enabled": 1,
                    "is_main": 0,
                    "has_cache": 0,
                    "proxy": ".vms.local",
                    "created_at": "2021-05-27 16:08:57",
                    "updated_at": "2022-05-26 16:58:02",
                    "group_type": "all",
                    "can_delete": false,
                    "streams_limit": 1000,
                    "bitrate_limit": 60000,
                    "extra": {
                        "io": {
                            "read_rate": 0,
                            "read_bytes": 0,
                            "write_rate": 0,
                            "write_bytes": 0
                        },
                        "cpu": {
                            "total": 5,
                            "usage": 7,
                            "stime_sec": 3164,
                            "utime_sec": 3164
                        },
                        "mem": {
                            "rss": 659566592,
                            "share": 10604544,
                            "usage": 2929971200
                        },
                        "net": {
                            "in_bitrate": 23484704,
                            "out_bitrate": 2221376
                        },
                        "drives": {
                            "/": {
                                "fs": "ext4",
                                "mount": "/",
                                "inode_free": 1427983,
                                "inode_total": 1589248,
                                "capacity_free": 14462369792,
                                "capacity_total": 25491165184
                            },
                            "none": {
                                "fs": "swap",
                                "mount": "none",
                                "inode_free": 0,
                                "inode_total": 0,
                                "capacity_free": 0,
                                "capacity_total": 0
                            },
                            "/boot": {
                                "fs": "ext4",
                                "mount": "/boot",
                                "inode_free": 97984,
                                "inode_total": 98304,
                                "capacity_free": 1230381056,
                                "capacity_total": 1551745024
                            },
                            "/storage": {
                                "fs": "ext4",
                                "mount": "/storage",
                                "inode_free": 32743795,
                                "inode_total": 32768000,
                                "capacity_free": 91621679104,
                                "capacity_total": 527371075584
                            }
                        },
                        "server": {
                            "ip4": "192.168.200.16",
                            "name": "MS-21.03-lts",
                            "build": "7c80c1d",
                            "uptime": 104760,
                            "startat": 1653468722,
                            "version": "21.03",
                            "hostname": "labMS4.vms.local",
                            "revision": "lts",
                            "timestamp": "20220524110654"
                        },
                        "cluster": {
                            "id": "100",
                            "node": "4",
                            "enable": "true",
                            "hostname": "labMS4.vms.local"
                        },
                        "license": {
                            "own": "Vms",
                            "type": "enterprise",
                            "issued": 1685109482
                        },
                        "streams": {
                            "total": 54,
                            "active": 22,
                            "clients": 2
                        },
                        "storages": {
                            "/storage": {
                                "fs": "",
                                "err": 0,
                                "name": "default",
                                "mount": "/storage",
                                "inode_free": 32743795,
                                "inode_total": 32768000,
                                "capacity_free": 91621679104,
                                "capacity_total": 527371075584
                            },
                            "/storage2": {
                                "fs": "",
                                "err": -2,
                                "name": "secondary",
                                "mount": "/storage2",
                                "inode_free": 0,
                                "inode_total": 0,
                                "capacity_free": 0,
                                "capacity_total": 0
                            }
                        }
                    }
                }
            ]
        }
    ],
    "links": {
        "first": "https://vms.local/api/admin/v1/clusters?per_page=25&page=1",
        "last": "https://vms.local/api/admin/v1/clusters?per_page=25&page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "https://vms.local/api/admin/v1/clusters?per_page=25&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "https://vms.local/api/admin/v1/clusters",
        "per_page": 25,
        "to": 3,
        "total": 3
    }
}

401 Unauthorized

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

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

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

If this problem persists, please contact our support.