Skip to main content
Skip table of contents

The list of media server groups

List of media server groups

GET /api/admin/v1/packs

Parameters

int per_page, Number of elements in one pagination page.


int page, Number of page


string search, Search by name


array clusters, Array of cluster ids


array servers, Array of server ids


bool with_clusters, Display only those groups that contain clusters (true|false, by default true)


array analytic_regions, Array of IDs of the analytics regions by which media server groups will be filtered


int move_region_to_top, Id of the analytics region for which the in_current_region field will be added - true|false for each record (those groups that are added to this region will be at the top of the list)

200 OK

Successful response

JSON
{
    "data": [
        {
            "id": 1,
            "name": "aaa",
            "parent_id": null,
            "in_current_region": true
        },
        {
            "id": 2,
            "name": "bbb",
            "parent_id": null,
            "in_current_region": true
        },
        {
            "id": 3,
            "name": "ccc",
            "parent_id": null,
            "in_current_region": false
        }
    ],
    "links": {
        "first": "http://127.0.0.1:8000/api/admin/v1/packs/list?with_clusters=false&page=1",
        "last": "http://127.0.0.1:8000/api/admin/v1/packs/list?with_clusters=false&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/packs/list?with_clusters=false&page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "http://127.0.0.1:8000/api/admin/v1/packs/list",
        "per_page": 25,
        "to": 3,
        "total": 3
    }
}

401 Unauthorized

Authorization token not sent or not valid

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

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

If this problem persists, please contact our support.