云服务器内容精选

  • 配置ROI ROI即Region of Interest,表示算法的检测区域。部分算法要求必须填入表示检测区域的JSON格式的字符串,例如:{"polygons":[{"data":[[84,389],[1840,349],[1824,526],[78,526]]}]},其中[84,389]这类结构表示的是横纵坐标,{"data":[...]}表示由这些坐标点连线构成的一个图形,"polygons":[...]}表示复数个{"data":[...]}图形都为多边形区域。示例的整个字符串表示由这四个坐标点构成的多边形区域。同理{"lines":[{"data":[[238,481],[1309,481]]}]}表示由两个坐标点构成的线段。 除了直接填入表示区域的字符串外还可直接通过手工绘制的方式配置ROI,平台将根据绘制的结果自动生成对应的表示区域的JSON格式字符串。 配置ROI 绘画直线段时,单击,在图中画出期望的直线段。 图1 绘画直线段 绘画多边形时,单击,在图中画出期望的检测区域,最后一条线段不需要绘画,双击鼠标表示绘画多边形结束,区域将自动闭合。 图2 绘画多边形 绘画多边形区域时,线段不能交叉。 可在图中绘画多个多边形区域。 可以在绘制区域按钮中自定义名称和颜色。 保存ROI模板 绘制好需要的ROI之后,输入ROI名称,单击保存,将所绘的ROI保存到模板中。 图3 保存ROI模板 选择ROI模板 单击选中需要的ROI模板,则可在当前任务中使用。 图4 ROI模板 除了在新建任务过程中可以增加ROI模板外,也可以单击视频源详情进行ROI模板的绘制。 图5 ROI管理 父主题: 参考信息
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。
  • 请求示例 人流量作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-flowcount-cloud/tasks { "name" : "flowcount-task", "description" : "flowcount 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" : { "line_count_interval" : 2, "region_count_interval" : 2, "line_detection_sw" : 1, "region_detection_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]]}]}", "heatmap_detection_sw" : 0, "heatmap_detection_interval" : 60, "heatmap_point_interval" : 4 } } } 人流量作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-flowcount-cloud/tasks { "name" : "flowcount-task", "description" : "flowcount task test", "input" : { "type" : "obs", "data" : [ { "bucket" : "obs_test_video", "path" : "test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "line_count_interval" : 2, "region_count_interval" : 2, "line_detection_sw" : 1, "region_detection_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]]}]}", "heatmap_detection_sw" : 0, "heatmap_detection_interval" : 60, "heatmap_point_interval" : 4 } } } 人流量作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-flowcount-cloud/tasks { "name" : "flowcount-task", "description" : "flowcount task test", "input" : { "type" : "url", "data" : [ { "url" : "https://obs_test/test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "line_count_interval" : 2, "region_count_interval" : 2, "line_detection_sw" : 1, "region_detection_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]]}]}", "heatmap_detection_sw" : 0, "heatmap_detection_interval" : 60, "heatmap_point_interval" : 4 } } }
  • 请求示例 云上城管事件-动态视角井盖缺失检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-mobile-manholecover-cloud/tasks { "name" : "mobile-manholecovermiss-detect-task", "description" : "manholecovermiss 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" : { "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]],\"name\":\"a\"}]}" } } } 云上城管事件-动态视角井盖缺失检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-mobile-manholecover-cloud/tasks { "name" : "mobile-manholecovermiss-detect-task", "description" : "manholecovermiss task test", "input" : { "type" : "url", "data" : [ { "url" : "https://obs_test/test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]],\"name\":\"a\"}]}" } } } 云上城管事件-动态视角井盖缺失检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-mobile-manholecover-cloud/tasks { "name" : "mobile-manholecovermiss-detect-task", "description" : "manholecovermiss task test", "input" : { "type" : "obs", "data" : [ { "bucket" : "obs_test_video", "path" : "test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]],\"name\":\"a\"}]}" } } }
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。
  • 请求示例 边缘戴口罩检测作业创建,使用输入源为video_source,输出为webhook。 POST /v2/{project_id}/services/c-wear-mask-recog-edge/tasks { "name" : "wearmask-task", "description" : "wearmask detection task test", "input" : { "type" : "video_source", "data" : [ { "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx" } ] }, "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" : { "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "image_compression_ratio" : 90 } } } 边缘戴口罩检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-wear-mask-recog-edge/tasks { "name" : "wearmask-task", "description" : "wearmask detection 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" : { "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "image_compression_ratio" : 90 } } } 边缘戴口罩检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-wear-mask-recog-edge/tasks { "name" : "wearmask-task", "description" : "wearmask detection 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" : { "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "image_compression_ratio" : 90 } } } 边缘戴口罩检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-wear-mask-recog-edge/tasks { "name" : "wearmask-task", "description" : "wearmask detection 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" : { "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "image_compression_ratio" : 90 } } }
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。
  • 请求示例 云上非机动车检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-non-motor-detection-cloud/tasks { "name" : "nonmotor-task", "description" : "nonmotor 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" : { "event_disappear_alert_sw" : 0, "illegal_park_detection_sw" : 1, "illegal_park_alert_threshold" : 30, "intrusion_detection_sw" : 0, "electromobile_detect_sw" : 1, "bicycle_detect_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[43,266],[42,645],[472,644],[416,212]],\"name\":\"legal_area\"},{\"data\":[[311,182],[282,670],[941,661],[835,170]],\"name\":\"prohibit_entering_area\"}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "image_compression_ratio" : 90 } } } 云上非机动车检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-non-motor-detection-cloud/tasks { "name" : "nonmotor-task", "description" : "nonmotor task test", "input" : { "type" : "url", "data" : [ { "url" : "https://obs_test/test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "event_disappear_alert_sw" : 0, "illegal_park_detection_sw" : 1, "illegal_park_alert_threshold" : 30, "intrusion_detection_sw" : 0, "electromobile_detect_sw" : 1, "bicycle_detect_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[43,266],[42,645],[472,644],[416,212]],\"name\":\"legal_area\"},{\"data\":[[311,182],[282,670],[941,661],[835,170]],\"name\":\"prohibit_entering_area\"}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "image_compression_ratio" : 90 } } } 云上非机动车检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-non-motor-detection-cloud/tasks { "name" : "nonmotor-task", "description" : "nonmotor task test", "input" : { "type" : "obs", "data" : [ { "bucket" : "obs_test_video", "path" : "test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "event_disappear_alert_sw" : 0, "illegal_park_detection_sw" : 1, "illegal_park_alert_threshold" : 30, "intrusion_detection_sw" : 0, "electromobile_detect_sw" : 1, "bicycle_detect_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[43,266],[42,645],[472,644],[416,212]],\"name\":\"legal_area\"},{\"data\":[[311,182],[282,670],[941,661],[835,170]],\"name\":\"prohibit_entering_area\"}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "image_compression_ratio" : 90 } } }
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。
  • 请求示例 云上城管事件-动态视角垃圾检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-mobile-trash-detect-cloud/tasks { "name" : "mobile-trash-task", "description" : "mobile-trash 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" : { "image_compression_ratio" : 90, "min_trash_size" : 1, "render_result_sw" : 1 } } } 云上城管事件-动态视角垃圾检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-mobile-trash-detect-cloud/tasks { "name" : "mobile-trash-task", "description" : "mobile-trash task test", "input" : { "type" : "url", "data" : [ { "url" : "https://obs_test/test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "min_trash_size" : 1, "render_result_sw" : 1 } } } 云上城管事件-动态视角垃圾检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-mobile-trash-detect-cloud/tasks { "name" : "mobile-trash-task", "description" : "mobile-trash task test", "input" : { "type" : "obs", "data" : [ { "bucket" : "obs_test_video", "path" : "test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "min_trash_size" : 1, "render_result_sw" : 1 } } }
  • 请求示例 边缘河道标定水尺识别作业创建,使用输入源为video_source,输出为webhook。 POST /v2/{project_id}/services/cali-water-ruler-river-edge/tasks { "name" : "water-ruler-task", "description" : "water-ruler task test", "input" : { "type" : "video_source", "data" : [ { "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx" } ] }, "output" : { "webhook" : { "url" : "https://apigw.huawei.com/xxx/xxx/callback", "headers" : { "content-type" : "application/json" } } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "report_interval" : 1, "image_compression_ratio" : 90, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "render_calibration_sw" : 1 } } } 边缘河道标定水尺识别作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/cali-water-ruler-river-edge/tasks { "name" : "water-ruler-task", "description" : "water-ruler 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" : { "report_interval" : 1, "image_compression_ratio" : 90, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "render_calibration_sw" : 1 } } } 边缘河道标定水尺识别作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/cali-water-ruler-river-edge/tasks { "name" : "water-ruler-task", "description" : "water-ruler task test", "input" : { "type" : "vcn", "vcn" : { "ip" : "xxx.xxx.xxx.xxx", "password" : "CQeNfcRLwyMvH77AkDBaPS+BKXdFu/1bAXtIMNTx3QPbVewjipNq06nNodxWI28I1lCUsvv2+wB1joepzynLVW3g2nz0k9vaCRDoK6=", "port" : "xxx", "username" : "testname" }, "data" : [ { "index" : 0, "stream_type" : 1, "device_id" : "07211540881586160101#f7964493ff764bbf9294d58b22e63de6" } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "report_interval" : 1, "image_compression_ratio" : 90, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "render_calibration_sw" : 1 } } } 边缘河道标定水尺识别作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/cali-water-ruler-river-edge/tasks { "name" : "water-ruler-task", "description" : "water-ruler task test", "input" : { "type" : "restful", "data" : [ { "index" : 0, "url" : "http://xxx.xxx.xxx.xxx:xxx/test/data", "certificate_check" : false, "rtsp_path_in_response" : "data/url" } ] }, "output" : { "webhook" : { "url" : "https://apigw.huawei.com/xxx/xxx/callback", "headers" : { "content-type" : "application/json" } } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "report_interval" : 1, "image_compression_ratio" : 90, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "calibration_info" : "{\"lines\":[{\"data\":[[460,741],[660,741]],\"scale\":110},{\"data\":[[460,420],[660,420]],\"scale\":71},{\"data\":[[460,190],[660,190]],\"scale\":22}]}", "render_result_sw" : 1, "render_roi_sw" : 1, "render_calibration_sw" : 1 } } }
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。
  • 请求示例 云上打架检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-fightdetect-cloud/tasks { "name" : "fight-detection-task", "description" : "fight detection 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" : { "image_compression_ratio" : 90, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[204,64],[90,321],[511,319],[617,221],[582,38],[320,11],[228,24]]}]}", "render_roi_sw" : 1 } } } 云上打架检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-fightdetect-cloud/tasks { "name" : "fight-detection-task", "description" : "fight detection task test", "input" : { "type" : "url", "data" : [ { "url" : "https://obs_test/test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[204,64],[90,321],[511,319],[617,221],[582,38],[320,11],[228,24]]}]}", "render_roi_sw" : 1 } } } 云上打架检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-fightdetect-cloud/tasks { "name" : "fight-detection-task", "description" : "fight detection task test", "input" : { "type" : "obs", "data" : [ { "bucket" : "obs_test_video", "path" : "test.mp4", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "image_compression_ratio" : 90, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[204,64],[90,321],[511,319],[617,221],[582,38],[320,11],[228,24]]}]}", "render_roi_sw" : 1 } } }
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表15 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。