Skip to main content
Skip table of contents

Создание задания для аналитики

Создание задания для аналитики

Метод для создания нового задания для аналитики.

JSON
{
    "CameraGroupUid": "3bc11a36-06bf-4f5f-b45d-5ee3bf702b09",
    "CaseType": "camera-obstacle",
    "Regions": [
        "minsk"
    ],
    "Collections": [
        "n5da4c68-4247-417f-9abc-b820fa75820v",
        "m6da4c68-4247-417f-9abc-b720fa75820s"
    ],
    "Pipeline": {
        "Processing": {
            "fps": 10,
            "min_obj_size": 20
        },
        "Detector": {
            "ScoreThreshold": 496
        },
        "Fences": [],
        "Areas": [
            [
                0.25,
                0.21
            ],
            [
                0.69,
                0.21
            ],
            [
                0.89,
                0.7
            ],
            [
                0.24,
                0.72
            ],
            [
                0.27,
                0.23
            ]
        ]
    },
    "Source": {
        "Uid": "3bc21a36-06bf-4f5f-b45d-5cc3bf702b33",
        "Url": "rtsp://labnsms3.navekscreen.video:5554/live/b1da4c68-4247-417f-9abc-b720fa75820a/?token=XnC-UVgDSUgL8WT8iFCki04pvw49lS2hYbq2EsuIB2MsBgzkNqg6S1-apHozSsFgPi409K_6gmMvJukxmyjFXwC7QQ1Y-3p1e8wdeI67gW5MJu7XWColxQmjH2Tn6tdRknyn_7VH2EdJu7to0N4t9g~~&"
    }
}

POST /api/streams/?format=json

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

array Collections, массив идентификаторов (uid-ов) коллекций, которые должны быть связаны с заданием. Передаются в случае создания задания типа "Распознавание лиц" и "Распознавание автомобильных номеров".


string CaseType REQUIRED, тип задания.


array Regions, массив списка зон (регионов).


string CameraGroupUid, идентификатор для группы видеопотоков в рамках одного кейса аналитики.


object Source REQUIRED, Описание видеопотока для аналитики

object object

string

Source.Uid

, Идентификатор видеопотока


string 

Source.Url

, Ссылка на видеопоток.


object Pipeline, Описание пайплайна (входных параметров) для аналитики

object object

array

 

Pipeline.Areas

, Координаты выделенных зон.


object

 

Pipeline.Detector

, Описание детектора для аналитики


float 

Pipeline.Detector.ScoreThreshold

, Пороговое значение для "Распознавания автомобильных номеров" и "Распознавания лиц", при котором события будут считаться распознанным или нераспознанным.


array 

Pipeline.Fences

, Координаты линий.


object 

Pipeline.Processing

, Конфигуцрация кейса в зависимости от типа аналитики


200 OK

Возвращает JSON объект с идентификатором созданного задания

JSON
{
    "stream_uid": "b1da4c68-4247-417f-9abc-b720fa75820a"
}
cURL
BASH
curl -k --request POST \
	--url 'https://your-domain/api/streams/?format=json' \
	--header 'Content-Type: application/json' \
	--header 'Accept: application/json' \
	--data '{
    "Collections": [],
    "CaseType": "string",
    "Regions": [],
    "CameraGroupUid": "string",
    "Source": {
        "Uid": "string",
        "Url": "string"
    },
    "Source.Uid": "void",
    "Source.Url": "void",
    "Pipeline": {
        "Processing": {},
        "Detector": {
            "ScoreThreshold": 0
        },
        "Fences": [],
        "Areas": []
    },
    "Pipeline.Processing": "void",
    "Pipeline.Detector": "void",
    "Pipeline.Detector.ScoreThreshold": "void",
    "Pipeline.Fences": "void",
    "Pipeline.Areas": "void"
}'
PHP
PHP
$data = array (
  'Collections' => 
  array (
  ),
  'CaseType' => 'string',
  'Regions' => 
  array (
  ),
  'CameraGroupUid' => 'string',
  'Source' => 
  array (
    'Uid' => 'string',
    'Url' => 'string',
  ),
  'Source.Uid' => 'void',
  'Source.Url' => 'void',
  'Pipeline' => 
  array (
    'Processing' => 
    (object) array(
    ),
    'Detector' => 
    array (
      'ScoreThreshold' => 0.0,
    ),
    'Fences' => 
    array (
    ),
    'Areas' => 
    array (
    ),
  ),
  'Pipeline.Processing' => 'void',
  'Pipeline.Detector' => 'void',
  'Pipeline.Detector.ScoreThreshold' => 'void',
  'Pipeline.Fences' => 'void',
  'Pipeline.Areas' => 'void',
);
$context = stream_context_create([
	'ssl'=>['verify_peer' => false],
	'http' => [
		'method' => 'POST',
		'header' => "Content-Type: application/json\r
Accept: application/json",
		'content'=>json_encode($data)
	]
]);
$result = file_get_contents('https://your-domain/api/streams/?format=json', false, $context);
JavaScript errors detected

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

If this problem persists, please contact our support.