Skip to main content
Skip table of contents

Получение информации для дашборда

Получение информации для дашборда

Статистика по камерам, пользователям, серверам и жалобам

GET api/admin/v1/dashboard

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

string timezone, часовой пояс для шаблона фильтрации по дате. Пример - Europe/Paris. Это поле обязательно при фильтрации по дате


string date, существующий период (если не указан по умолчанию today)


date from, дата начала кастомного периода


date to, дата конца кастомного периода

200 OK

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

JSON
{
    "users": {
        "all": {
            "count_all": 80,
            "count_for_range": {
                "number": -1,
                "percent": -1.23
            }
        },
        "others": {
            "legal": {
                "count_all": 3,
                "count_for_range": {
                    "number": 0,
                    "percent": 0
                }
            },
            "individual": {
                "count_all": 2,
                "count_for_range": {
                    "number": 0,
                    "percent": 0
                }
            },
            "sub": {
                "count_all": 4,
                "count_for_range": {
                    "number": 0,
                    "percent": 0
                }
            },
            "special": {
                "count_all": 0,
                "count_for_range": {
                    "number": -1,
                    "percent": -1.72
                }
            }
        }
    },
    "cameras": {
        "count_all": 0,
        "count_with_issues": 0,
        "count_for_range": {
            "number": 0,
            "percent": 0
        },
        "count_inactive": 0,
        "streams": {
            "top_by_bitrate": []
        }
    },
    "issues": {
        "count_with_issues": 0,
        "count_issues": "0",
        "top_by_issues": []
    },
    "mediaservers": {
        "count_all": 7,
        "count_inactive": 0,
        "count_enabled": 6,
        "avg_count_cams": 0,
        "avg_count_users": 2,
        "top_by_bitrate": [
            {
                "id": 1,
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "mediaserver1.vms.local",
                "external_domain": "mediaserver1.vms.local",
                "domain": "mediaserver1.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-01-27T17:16:16.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 100,
                "bitrate_limit": 1000000,
                "extra": {
                    "server": {
                        "hostname": "mediaserver1.vms.local"
                    }
                },
                "is_editable": false,
                "is_stream_condition_management_enabled": false,
            },
            {
                "id": 5,
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "labnsms3.vms.video",
                "external_domain": "labnsms3.vms.video",
                "domain": "labnsms3.vms.video",
                "internal": "8080",
                "external": "8443",
                "rtsp": "5554",
                "traffic_in": 0,
                "traffic_out": 0,
                "status": true,
                "is_enabled": true,
                "has_cache": false,
                "proxy": "labnsms3.vms.video",
                "created_at": "2021-05-27T16:16:26.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 100,
                "bitrate_limit": 1000000,
                "extra": {
                    "server": {
                        "hostname": "labnsms3.vms.video"
                    },
                },
                "is_editable": true,
                "is_stream_condition_management_enabled": false
            },
            {
                "id": 3,
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "labnsms4.vms.video",
                "external_domain": "labnsms4.vms.video",
                "domain": "labnsms4.vms.video",
                "internal": "8080",
                "external": "8443",
                "rtsp": "5554",
                "traffic_in": 10631,
                "traffic_out": 71716,
                "status": true,
                "is_enabled": true,
                "has_cache": false,
                "proxy": "labnsms4.vms.video",
                "created_at": "2021-05-27T16:15:44.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 100,
                "bitrate_limit": 1000000,
                "extra": {
                    "server": {
                        "hostname": "labnsms4.vms.video"
                    },
                },
                "is_editable": true,
                "is_stream_condition_management_enabled": false
            },
            {
                "id": 4,
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "labnsms5.vms.video",
                "external_domain": "labnsms5.vms.video",
                "domain": "labnsms5.vms.video",
                "internal": "8080",
                "external": "8443",
                "rtsp": "5554",
                "traffic_in": 0,
                "traffic_out": 0,
                "status": true,
                "is_enabled": true,
                "has_cache": false,
                "proxy": "labnsms5.vms.local",
                "created_at": "2021-05-27T16:17:06.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 6000,
                "bitrate_limit": 600000,
                "extra": {
                    "server": {
                        "hostname": "labnsms5.vms.local"
                    },
                },
                "is_editable": true,
                "is_stream_condition_management_enabled": false
            },
            {
                "id": 5,
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "labnsms6.vms.video",
                "external_domain": "labnsms6.vms.video",
                "domain": "labnsms6.vms.video",
                "internal": "8080",
                "external": "8443",
                "rtsp": "5554",
                "traffic_in": 7297,
                "traffic_out": 33646,
                "status": true,
                "is_enabled": true,
                "has_cache": false,
                "proxy": "labnsms6.vms.local",
                "created_at": "2021-05-27T16:07:46.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 1000,
                "bitrate_limit": 600000,
                "extra": {
                    "server": {
                        "hostname": "labnsms6.vms.local"
                    },
                },
                "is_editable": true,
                "is_stream_condition_management_enabled": false
            },
            {
                "id": 6,
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "labnsms7.navekscreen.video",
                "external_domain": "labnsms7.navekscreen.video",
                "domain": "labnsms7.navekscreen.video",
                "internal": "8080",
                "external": "8443",
                "rtsp": "5554",
                "traffic_in": 7975,
                "traffic_out": 0,
                "status": true,
                "is_enabled": true,
                "has_cache": false,
                "proxy": "labnsms7.vms.local",
                "created_at": "2021-05-27T16:15:02.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 1000,
                "bitrate_limit": 60000,
                "extra": {
                    "server": {
                        "hostname": "labnsms7.vms.local"
                    },
                },
                "is_editable": true,
                "is_stream_condition_management_enabled": false
            },
            {
                "id": 7
                "type": "media_server_v2",
                "schema": "https",
                "internal_domain": "labnsms8.navekscreen.video",
                "external_domain": "labnsms8.navekscreen.video",
                "domain": "labnsms8.navekscreen.video",
                "internal": "8080",
                "external": "8443",
                "rtsp": "5554",
                "traffic_in": 3985,
                "traffic_out": 610,
                "status": true,
                "is_enabled": true,
                "has_cache": false,
                "proxy": "labnsms8.vms.local",
                "created_at": "2021-05-27T16:08:57.000000Z",
                "updated_at": "2022-06-23T13:52:02.000000Z",
                "user_type": null,
                "group_type": "all",
                "streams_limit": 1000,
                "bitrate_limit": 60000,
                "extra": {
                    "server": {
                        "hostname": "labnsms8.vms.local"
                    },
                },
                "is_editable": true,
                "is_stream_condition_management_enabled": false
            }
        ]
    }
}

401 Unauthorized

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

cURL
BASH
curl -k --request POST \
	--url 'https://your-domainapi/admin/v1/dashboard' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "timezone": "string",
    "date": "string",
    "from": "date",
    "to": "date"
}'
PHP
PHP
$data = array (
  'timezone' => 'string',
  'date' => 'string',
  'from' => 'date',
  'to' => 'date',
);
$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-domainapi/admin/v1/dashboard', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.