华为云用户手册

  • 动作活体检测 目前支持检测视频文件,或视频的Base64编码,不支持直接检测视频流,需要用户客户端自己获取视频流并保存成文件,然后调用活体检测接口。 视频文件大小不超过8MB,建议客户端压缩到200KB~2MB。 限制视频时长1~15秒。 建议帧率10fps~30fps。 封装格式:mp4、avi、flv、webm、asf、mov。 视频编码格式:h261、h263、h264、hevc、vc1、vp8、vp9、wmv3。
  • 使用服务 人脸识别提供了Web化的服务管理平台,即管理控制台,以及基于HTTPS请求的API管理方式。人脸识别以开放API的方式提供给用户,用户需要将人脸识别集成到第三方系统后才可使用。 用户需要先在管理控制台开通人脸识别服务,使用第三方系统调用API即可使用服务,具体流程如下: 申请服务 在使用服务之前,您需要先登录人脸识别管理控制台开通服务,服务开通一次即可,后续使用时无需再开通。 在使用人脸识别服务时需要对OBS的数据进行操作,因此需要先同意服务授权:在开通服务界面,单击右上角“服务授权”,完成OBS授权操作。 获取请求认证 调用人脸识别的API有如下两种认证方式,请任选其中一种进行认证鉴权,鉴权详情请参见《认证鉴权》。 Token认证:通过Token认证调用请求。 AK/SK认证:通过AK/SK加密调用请求。AK/SK认证安全性更高。 调用API 人脸识别以API的方式提供服务,具体请参见《人脸识别API参考》。 查看服务使用信息 用户可以在人脸识别管理控制台查看服务调用成功的次数。
  • 云监控 人脸识别服务使用云监控(Cloud Eye)监控各个子服务的API调用次数、时延等信息,具体如表2所示。云监控的更多信息请参见《云监控用户指南》。 表2 监控指标 指标名称 指标含义 取值范围 测量对象 成功调用次数 该指标用于统计API的成功调用次数。 单位:次(times)。 ≥ 0 times 人脸识别 失败调用次数 该指标用于统计状态码为5xx的调用API失败的次数。 单位:次(times)。 ≥ 0 times 人脸识别 平均时延 该指标用于统计API的平均时延。 单位:毫秒(ms)。 ≥ 0 ms 人脸识别 人脸数量 该指标用于统计人脸库的人脸数量。 建议人脸库的名称不要以下划线“_”开头,否则云监控服务会无法采集人脸数量。 单位:张(count)。 ≥ 0 count 人脸识别
  • 响应参数 状态码: 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 } } }
  • 响应参数 状态码: 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-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\"}]}" } } }
  • 请求示例 边缘戴口罩检测作业创建,使用输入源为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 建议。
  • 请求示例 云上城管事件-动态视角垃圾检测作业创建,使用输入源为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 } } }
  • 响应参数 状态码: 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/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 建议。
  • 请求示例 边缘高点车辆统计作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-vehicle-statistics-edge/tasks { "name" : "vehicle-statistics-task", "description" : "vehicle-statistics 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}}", "count_interval" : 10, "output_image_sw" : 1, "image_compression_ratio" : 100 } } } 边缘高点车辆统计作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-vehicle-statistics-edge/tasks { "name" : "vehicle-statistics-task", "description" : "vehicle-statistics 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}}", "count_interval" : 10, "output_image_sw" : 1, "image_compression_ratio" : 100 } } } 边缘高点车辆统计作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-vehicle-statistics-edge/tasks { "name" : "vehicle-statistics-task", "description" : "vehicle-statistics 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}}", "count_interval" : 10, "output_image_sw" : 1, "image_compression_ratio" : 100 } } } 边缘高点车辆统计作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-vehicle-statistics-edge/tasks { "name" : "vehicle-statistics-task", "description" : "vehicle-statistics 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}}", "count_interval" : 10, "output_image_sw" : 1, "image_compression_ratio" : 100 } } }
  • 响应参数 状态码: 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-urban-soil-exposure-edge/tasks { "name" : "soil-exposure-task", "description" : "soil-exposure 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\"}]}" } } } 边缘城管事件-裸土暴露检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-urban-soil-exposure-edge/tasks { "name" : "soil-exposure-task", "description" : "soil-exposure 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" : { "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\"}]}" } } } 边缘城管事件-裸土暴露检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-urban-soil-exposure-edge/tasks { "name" : "soil-exposure-task", "description" : "soil-exposure 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" : { "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\"}]}" } } } 边缘城管事件-裸土暴露检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-urban-soil-exposure-edge/tasks { "name" : "soil-exposure-task", "description" : "soil-exposure 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" : { "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,输出为dis。 POST /v2/{project_id}/services/c-trash-abnormal-detect-cloud/tasks { "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "alert_time_threshold" : 30, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[43,266],[42,645],[472,644],[416,212]]},{\"data\":[[311,182],[282,670],[941,661],[835,170]]}]}", "image_compression_ratio" : 80 } } } 云上垃圾桶异常检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-trash-abnormal-detect-cloud/tasks { "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "alert_time_threshold" : 30, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[43,266],[42,645],[472,644],[416,212]]},{\"data\":[[311,182],[282,670],[941,661],[835,170]]}]}", "image_compression_ratio" : 80 } } } 云上垃圾桶异常检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-trash-abnormal-detect-cloud/tasks { "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "alert_time_threshold" : 30, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[43,266],[42,645],[472,644],[416,212]]},{\"data\":[[311,182],[282,670],[941,661],[835,170]]}]}", "image_compression_ratio" : 80 } } }
  • 响应参数 状态码: 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-urban-umbrella-cloud/tasks { "name" : "umbrella-task", "description" : "umbrella 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-urban-umbrella-cloud/tasks { "name" : "umbrella-task", "description" : "umbrella 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-urban-umbrella-cloud/tasks { "name" : "umbrella-task", "description" : "umbrella 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\"}]}" } } }
  • 请求示例 边缘个体事件行为检测作业创建,使用输入源为video_source,输出为webhook。 POST /v2/{project_id}/services/c-event-action-recog-edge/tasks { "name": "event-action-detection-task", "description": "event-action 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": { "smoking_detection_sw": 1, "phoning_detection_sw": 0, "render_result_sw": 1, "render_roi_sw": 1, "target_roi": "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio": 90, "suspected_output_sw" : 1 } } } 边缘个体事件行为检测作业创建,使用输入源为vcn,输出为dis。 POST /v2/{project_id}/services/c-event-action-recog-edge/tasks { "name": "event-action-detection-task", "description": "event-action 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": { "smoking_detection_sw": 1, "phoning_detection_sw": 0, "render_result_sw": 1, "render_roi_sw": 1, "target_roi": "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio": 90, "suspected_output_sw" : 1 } } } 边缘个体事件行为检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-event-action-recog-edge/tasks { "name": "event-action-detection-task", "description": "event-action 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": { "smoking_detection_sw": 1, "phoning_detection_sw": 0, "render_result_sw": 1, "render_roi_sw": 1, "target_roi": "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio": 90, "suspected_output_sw" : 1 } } } 边缘个体事件行为检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-event-action-recog-edge/tasks { "name": "event-action-detection-task", "description": "event-action 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": { "smoking_detection_sw": 1, "phoning_detection_sw": 0, "render_result_sw": 1, "render_roi_sw": 1, "target_roi": "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio": 90, "suspected_output_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,输出为webhook。 POST /v2/{project_id}/services/c-highpoint-crowdcount-edge/tasks { "name" : "highpoint-crowdcount-task", "description" : "highpoint-crowdcount 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" : { "alarm_threshold" : "5", "sampling_time_interval" : 8, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "alert_mode" : "single", "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 边缘高点人群统计作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-highpoint-crowdcount-edge/tasks { "name" : "highpoint-crowdcount-task", "description" : "highpoint-crowdcount 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" : { "alarm_threshold" : "5", "sampling_time_interval" : 8, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "alert_mode" : "single", "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 边缘高点人群统计作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-highpoint-crowdcount-edge/tasks { "name" : "highpoint-crowdcount-task", "description" : "highpoint-crowdcount 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" : { "alarm_threshold" : "5", "sampling_time_interval" : 8, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "alert_mode" : "single", "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 边缘高点人群统计作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-highpoint-crowdcount-edge/tasks { "name" : "highpoint-crowdcount-task", "description" : "highpoint-crowdcount 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" : { "alarm_threshold" : "5", "sampling_time_interval" : 8, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "alert_mode" : "single", "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } }
  • 响应参数 状态码: 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-urban-roadside-stall-cloud/tasks { "name" : "roadside-task", "description" : "roadside 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, "image_compression_ratio" : 90, "roadside_stall_detect_sw" : 1, "outstore_stall_detect_sw" : 0, "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-urban-roadside-stall-cloud/tasks { "name" : "roadside-task", "description" : "roadside 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, "image_compression_ratio" : 90, "roadside_stall_detect_sw" : 1, "outstore_stall_detect_sw" : 0, "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-urban-roadside-stall-cloud/tasks { "name" : "roadside-task", "description" : "roadside 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, "image_compression_ratio" : 90, "roadside_stall_detect_sw" : 1, "outstore_stall_detect_sw" : 0, "render_roi_sw" : 1, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]],\"name\":\"a\"}]}" } } }
共100000条