视频智能分析服务 VIAS-创建边缘入侵检测作业:请求示例

时间:2025-02-12 14:54:45

请求示例

  • 边缘入侵检测作业创建,使用输入源为video_source,输出为dis

    POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks{  "name" : "intrusiondetection-task",  "description" : "intrusiondetection task test",  "input" : {    "type" : "video_source",    "data" : [ {      "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx"    } ]  },  "output" : {    "dis" : {      "stream_name" : "dis-test"    }  },  "service_version" : "3.0",  "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",  "config" : {    "common" : {      "car_detection_sw" : 0,      "person_detection_sw" : 1,      "detection_min_size" : 60,      "detection_max_size" : 1080,      "line_detection_sw" : 1,      "region_detection_sw" : 1,      "loitering_detection_sw" : 0,      "loitering_send_interval" : 300,      "image_compression_ratio" : 90,      "render_result_sw" : 1,      "all_print_sw" : 0,      "render_roi_sw" : 1,      "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}"    }  }}
  • 边缘入侵检测作业创建,使用输入源为边缘摄像头,输出为dis。

    POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks{  "name" : "intrusiondetection-task",  "description" : "intrusiondetection task test",  "input" : {    "type" : "edgecamera",    "data" : [ {      "id" : "aec5857c-222f-4aa9-be39-23654e118886",      "index" : 0    } ]  },  "output" : {    "dis" : {      "stream_name" : "dis-test"    }  },  "service_version" : "3.0",  "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",  "config" : {    "common" : {      "car_detection_sw" : 0,      "person_detection_sw" : 1,      "detection_min_size" : 60,      "detection_max_size" : 1080,      "line_detection_sw" : 1,      "region_detection_sw" : 1,      "loitering_detection_sw" : 0,      "loitering_send_interval" : 300,      "image_compression_ratio" : 90,      "render_result_sw" : 1,      "all_print_sw" : 0,      "render_roi_sw" : 1,      "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}"    }  }}
  • 边缘入侵检测作业创建,使用输入源为restful,输出为webhook。

    POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks{  "name" : "intrusiondetection-task",  "description" : "intrusiondetection task test",  "input" : {    "type" : "restful",    "data" : [ {      "url" : "https://restfultest",      "certificate_check" : false,      "node_id" : "aec5857c-222f-4aa9-be39-23654e118886",      "rtsp_path_in_response" : "http://testpath"    } ]  },  "output" : {    "webhook" : {      "url" : "https://127.0.0.1:8080/webhook",      "headers" : {        "x-auth-token" : "tokentest"      }    }  },  "service_version" : "3.0",  "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",  "config" : {    "common" : {      "car_detection_sw" : 0,      "person_detection_sw" : 1,      "detection_min_size" : 60,      "detection_max_size" : 1080,      "line_detection_sw" : 1,      "region_detection_sw" : 1,      "loitering_detection_sw" : 0,      "loitering_send_interval" : 300,      "image_compression_ratio" : 90,      "render_result_sw" : 1,      "all_print_sw" : 0,      "render_roi_sw" : 1,      "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}"    }  }}
  • 边缘入侵检测作业创建,使用输入源为VCN,输出为dis

    POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks{  "name" : "intrusiondetection-task",  "description" : "intrusiondetection task test",  "input" : {    "type" : "vcn",    "data" : [ {      "device_id" : "aec5857c-222f-4aa9-be39-23654e118886",      "stream_type" : 2    } ],    "vcn" : {      "ip" : "127.0.0.1",      "port" : 8080,      "username" : "vcntest",      "password" : "123456abcd"    }  },  "output" : {    "dis" : {      "stream_name" : "dis-test"    }  },  "service_version" : "3.0",  "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e",  "config" : {    "common" : {      "car_detection_sw" : 0,      "person_detection_sw" : 1,      "detection_min_size" : 60,      "detection_max_size" : 1080,      "line_detection_sw" : 1,      "region_detection_sw" : 1,      "loitering_detection_sw" : 0,      "loitering_send_interval" : 300,      "image_compression_ratio" : 90,      "render_result_sw" : 1,      "all_print_sw" : 0,      "render_roi_sw" : 1,      "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}"    }  }}
support.huaweicloud.com/vias-api/CreateIntrusionTasksEdge.html