На странице:

Инициирование тревоги

POST http://IP-адрес:порт/префикс/grpc

Тело запроса:

{
    "method":"axxonsoft.bl.logic.LogicService.RaiseAlert",
    "data":   {
        "camera_ap" : "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0"
        }
}

Ответ содержит id тревоги и результат. 

{
    "result": true,
    "alert_id": "ddb5ab56-627e-4761-a1eb-f497ef2f7745"
}

Переход к обработке тревоги

{
    "method":"axxonsoft.bl.logic.LogicService.BeginAlertReview",
    "data":{
        "camera_ap" : "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0",
        "alert_id" : "ddb5ab56-627e-4761-a1eb-f497ef2f7745"
            }
}

Отмена обработки тревоги

{
    "method":"axxonsoft.bl.logic.LogicService.CancelAlertReview",
    "data":{
        "camera_ap" : "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0",
        "alert_id" : "ddb5ab56-627e-4761-a1eb-f497ef2f7745"
    }
}

Продление обработки тревоги

{
    "method":"axxonsoft.bl.logic.LogicService.ContinueAlertReview",
    "data":{
        "camera_ap" : "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0",
        "alert_id" : "ddb5ab56-627e-4761-a1eb-f497ef2f7745"
            }
}

Оценка тревоги

Внимание!

Чтобы оценить тревогу, она должна быть в обработке.

{
    "method":"axxonsoft.bl.logic.LogicService.CompleteAlertReview",
    "data":{       
        "severity" : "SV_WARNING",
        "bookmark" : {},
        "camera_ap" : "hosts/Server1/DeviceIpint.10/SourceEndpoint.video:0:0",
        "alert_id" : "ddb5ab56-627e-4761-a1eb-f497ef2f7745"
            }
}

Примечание

Параметр severity определяет тип тревоги:

SV_UNCLASSIFIED – пропущенная;
SV_FALSE – ложная;
SV_WARNING – подозрительная;
SV_ALARM – подтвержденная.

Оценка тревоги с комментарием

Внимание!

Чтобы оценить тревогу, она должна быть в обработке.

{
    "method": "axxonsoft.bl.logic.LogicService.RaiseAlert",
    "data": {
        "camera_ap": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0"
    }
}

{
    "method": "axxonsoft.bl.logic.LogicService.BeginAlertReview",
    "data": {
       "camera_ap": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0",
       "alert_id": "eb683ba7-f30c-44cc-b762-71465f8d7015"
    }
}

{
    "method": "axxonsoft.bl.logic.LogicService.CompleteAlertReview",
    "data": {
        "severity": "SV_ALARM",
        "bookmark": {
            "guid": "b6ba95f2-b7c9-4bd4-93ef-f26040bc93e4",
            "timestamp": "20201001T072442.364",
            "node_info":  {
               "name": "Server1"
            },
            "is_protected": false,
            "camera": {
                "access_point":"hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0"
            },
            "archive": {
                "accessPoint": "hosts/Server1/MultimediaStorage.AliceBlue/MultimediaStorage"
            },
            "alert_id": "eb683ba7-f30c-44cc-b762-71465f8d7015",
            "group_id": "",
            "boundary": {
                "x": 0.5002633,
                "y": 0.4734651,
                "w": 75.50027,
                "h": 13.47346,
                "index": 0
            },
            "user": "root",
            "range": {
                "begin_time": "20201001T072442.364",
                "end_time": "20201001T072442.364"
            },
            "geometry": {
                "guid": "46486492-34ea-4e48-92ce-2cb43dfd7695",
                "alpha": 147,
                "type": "PT_NONE"
            },
            "message": "TEST"
        },
        "camera_ap": "hosts/Server1/DeviceIpint.1/SourceEndpoint.video:0:0",
        "alert_id": "eb683ba7-f30c-44cc-b762-71465f8d7015"
    }
}

где, в группе параметров bookmark:

  • guid необходимо задать самостоятельно, он должен быть уникальный для каждого комментария.
  • range: begin_time и end_time интервал времени, для которого будет сохранен комментарий. Интервал должен соответствовать времени тревоги.
  • message комментарий.
  • No labels