Skip to main content
Skip table of contents

Серверы аналитики

Серверы аналитики

GET /api/admin/v1/analytic-servers

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

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


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


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


string sort, сортировка осуществляется по 'name' и 'ip'


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

200 OK

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

JSON
{
    "data": [
        {
            "id": 4,
            "name": "S3",
            "domain": "192.168.111.4",
            "port": 8000,
            "binary": [
                {
                    "id": 481,
                    "binary_type": "motion-detect",
                    "streams": [
                        {
                            "id": 2295,
                            "job_uid": "1fd3697a-02a6-11ed-9b5d-21123bef9093",
                            "platform_json": "",
                            "binary_json": "",
                            "status": 11,
                            "stream_uid": "2e5f9079-4194-4df7-b329-9b7ca919926f",
                            "camera_group_uid": "86dd6641-4c3d-4172-a560-bf9809a8eb14",
                            "created_at": "2022-07-13T12:20:04.014044Z",
                            "updated_at": "2022-08-10T12:03:03.315601Z",
                            "camera_id": null
                        }
                    ],
                    "status": 2,
                    "options": null,
                    "uid": "d83756e0-9ae4-11ec-8995-a3b0e5228375",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Распознавание лиц"
                },
                {
                    "id": 487,
                    "binary_type": "person-counting",
                    "streams": [],
                    "status": 2,
                    "options": null,
                    "uid": "ea1d365a-9f7a-11ec-8995-a3b0e5228375",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Подсчет людей в области"
                },
                {
                    "id": 488,
                    "binary_type": "visitors-counting",
                    "streams": [],
                    "status": 2,
                    "options": null,
                    "uid": "61ef4c6c-a387-11ec-8995-a3b0e5228375",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Подсчет посетителей"
                },
                {
                    "id": 491,
                    "binary_type": "licplate-recognition",
                    "streams": [],
                    "status": 2,
                    "options": null,
                    "uid": "fee82e4e-ac33-11ec-8995-a3b0e5228375",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Распознавание номерных знаков"
                },
                {
                    "id": 503,
                    "binary_type": "loud-sounds",
                    "streams": [],
                    "status": 2,
                    "options": "",
                    "uid": "08e10efa-cd3d-11ec-88bc-59d920260ee8",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Детекция громких звуков"
                },
                {
                    "id": 504,
                    "binary_type": "smoke-fire",
                    "streams": [],
                    "status": 2,
                    "options": null,
                    "uid": "14d30290-cd3d-11ec-88bc-59d920260ee8",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Детекция дыма и огня"
                },
                {
                    "id": 507,
                    "binary_type": "line-intersection",
                    "streams": [],
                    "status": 2,
                    "options": null,
                    "uid": "41b22714-d512-11ec-88bc-59d920260ee8",
                    "executable_path": "/opt/video-analytics/mediaserver_v2-video-analytics-cpu.out",
                    "config_file_path": "/opt/video-analytics/config",
                    "additional_params": null,
                    "binary_type_pretty": "Детекция пересечения линии"
                }
            ]
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "pagination.previous",
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "active": true
            },
            {
                "url": null,
                "label": "pagination.next",
                "active": false
            }
        ],
        "path": "/",
        "per_page": 25,
        "to": 4,
        "total": 4
    }
}

401 Unauthorized

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

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

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

If this problem persists, please contact our support.