华为云用户手册

  • 请求示例 边缘垃圾桶异常检测作业创建,使用输入源为video_source,输出为webhook。 POST /v2/{project_id}/services/c-trash-abnormal-detect-edge/tasks{ "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "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 } }} 边缘垃圾桶异常检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-trash-abnormal-detect-edge/tasks{ "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "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 } }} 边缘垃圾桶异常检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-trash-abnormal-detect-edge/tasks{ "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "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 } }} 边缘垃圾桶异常检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-trash-abnormal-detect-edge/tasks{ "name" : "trashabnormal-task", "description" : "trashabnormal 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" : { "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 } }}
  • 请求示例 云上城管事件-垃圾检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-urban-trash-detect-cloud/tasks{ "name" : "trash-detect-task", "description" : "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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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-trash-detect-cloud/tasks{ "name" : "trash-detect-task", "description" : "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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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-trash-detect-cloud/tasks{ "name" : "trash-detect-task", "description" : "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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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 建议。
  • 响应参数 状态码: 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\"}]}" } }}
  • 响应参数 状态码: 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-non-motor-detection-edge/tasks{ "name" : "nonmotor-task", "description" : "nonmotor 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" : { "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 } }} 边缘非机动车检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-non-motor-detection-edge/tasks{ "name" : "nonmotor-task", "description" : "nonmotor 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" : { "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 } }} 边缘非机动车检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-non-motor-detection-edge/tasks{ "name" : "nonmotor-task", "description" : "nonmotor 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" : { "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 } }} 边缘非机动车检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-non-motor-detection-edge/tasks{ "name" : "nonmotor-task", "description" : "nonmotor 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" : { "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 表15 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表16 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表18 响应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-object-attri-recog-cloud/tasks{ "name" : "attri-task", "description" : "attri 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-object-attri-recog-cloud/tasks{ "name" : "attri-task", "description" : "attri 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-object-attri-recog-cloud/tasks{ "name" : "attri-task", "description" : "attri 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,输出为dis。 POST /v2/{project_id}/services/w-ponding-detection-cloud/tasks{ "name" : "ponding-task", "description" : "ponding 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_mode" : "single", "alert_detection_interval" : 60, "ponding_area_ratio_thres" : 0.1, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}", "image_compression_ratio" : 80 } }} 云上积水检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/w-ponding-detection-cloud/tasks{ "name" : "ponding-task", "description" : "ponding 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_mode" : "single", "alert_detection_interval" : 60, "ponding_area_ratio_thres" : 0.1, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}", "image_compression_ratio" : 80 } }} 云上积水检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/w-ponding-detection-cloud/tasks{ "name" : "ponding-task", "description" : "ponding 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_mode" : "single", "alert_detection_interval" : 60, "ponding_area_ratio_thres" : 0.1, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}", "image_compression_ratio" : 80 } }}
  • 请求示例 云上城管事件-占道经营检测作业创建,使用输入源为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\"}]}" } }}
  • 响应参数 状态码: 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-staffonduty-cloud/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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\":[[484,465],[1850,450],[1905,1013],[515,1050]]},{\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }} 云上关键岗位检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-staffonduty-cloud/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]},{\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }} 云上关键岗位检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-staffonduty-cloud/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]},{\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }}
  • 请求示例 边缘关键岗位检测作业创建,使用输入源为video_source,输出为dis POST /v2/{project_id}/services/c-staffonduty-edge/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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\":[[484,465],[1850,450],[1905,1013],[515,1050]]}, {\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }} 边缘关键岗位检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-staffonduty-edge/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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\":[[484,465],[1850,450],[1905,1013],[515,1050]]}, {\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }} 边缘关键岗位检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-staffonduty-edge/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]}, {\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }} 边缘关键岗位检测作业创建,使用输入源为VCN,输出为dis POST /v2/{project_id}/services/c-staffonduty-edge/tasks{ "name" : "staffonduty-task", "description" : "staffonduty 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" : { "target_roi" : "{\"polygons\":[{\"data\":[[484,465],[1850,450],[1905,1013],[515,1050]]}, {\"data\":[[484,125],[1800,125],[1800,677],[495,677]]}]}", "image_compression_ratio" : 90, "key_region_detection_sw" : 1, "key_region_detect_interval" : 2, "key_region_detect_threshold" : 2, "key_region_person_count" : 50 } }}
  • 响应参数 状态码: 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-trash-detect-edge/tasks{ "name" : "trash-detect-task", "description" : "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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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-trash-detect-edge/tasks{ "name" : "trash-detect-task", "description" : "trash 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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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-trash-detect-edge/tasks{ "name" : "trash-detect-task", "description" : "trash 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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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-trash-detect-edge/tasks{ "name" : "trash-detect-task", "description" : "trash 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, "trash_detect_sw" : 1, "person_constraint_sw" : 0, "min_trash_size" : 1, "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 建议。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 total_count Integer 作业总数 failed_count Integer 失败作业数量 succeed_count Integer 成功作业数量 id String 批量作业id error_list Array of strings 错误信息列表 状态码: 400 表4 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息描述 detail String 错误详情 params Array of strings 错误参数列举 reason String 错误原因 advice String 建议 状态码: 500 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息描述 detail String 错误详情 params Array of strings 错误参数列举 reason String 错误原因 advice String 建议
  • 请求示例 部署算法,配置资源池ID、可承载的最大路数和服务启动参数 GET https://{endpoint}/v2/{project_id}/algorithm/068ed4d8-077e-4ec9-aa19-bc******e925/deploy{ "pool_id" : "ed9f128bf7d04f5683f0ef******a255", "stream_count" : 1, "deploy_config" : { "sub_scene" : "common" }}
  • 请求示例 创建输入类型为“video_source”,输出类型为“webhook”,算法版本为1.1,没有任务启动参数,不保存作业模板的请求体 /v2/{project_id}/services/{service_name}/tasks{ "name" : "Test", "input" : { "type" : "video_source", "data" : [ { "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx" } ] }, "output" : { "webhook" : { "url" : "http://test", "headers" : { "a" : "a" } } }, "config" : { "common" : { } }, "service_version" : "1.1", "is_saved_as_template" : false} 兼容IVA的老接口,采用此请求体 /v2/{project_id}/services/{service_name}/tasks{ "name" : "test-alg-819", "input" : { "type" : "url", "data" : [ { "url" : "https://iuwhediue-input.com", "index" : 0 } ] }, "output" : { "webhook" : { "url" : "https://iuwhediue-output.com", "headers" : { "AA" : "AA" } } }, "config" : { "common" : { "viewpoint" : 1 } }, "service_version" : "3.0", "is_saved_as_template" : false, "resource_order_id" : "029b34a69efd48769215e429deff0cec"} 创建定时任务,若存在相邻两天前一天结束时间为23:59:00,第二天开始为00:00:00,则为跨天任务,保持运行中状态。 /v2/{project_id}/services/{service_name}/tasks{ "name" : "test-alg-819", "schedule" : { "type" : "weekly", "timezone" : "+08:00", "days_of_week" : [ 1, 2, 3, 4, 5, 6, 7 ], "periods" : [ [ ], [ ], [ ], [ ], [ { "begin_at" : "22:15:00", "end_at" : "23:59:00" } ], [ { "begin_at" : "00:00:00", "end_at" : "23:59:00" } ], [ { "begin_at" : "22:15:00", "end_at" : "23:59:00" } ] ] }, "input" : { "type" : "url", "data" : [ { "url" : "https://iuwhediue-input.com", "index" : 0 } ] }, "output" : { "webhook" : { "url" : "https://iuwhediue-output.com", "headers" : { "AA" : "AA" } } }, "config" : { "common" : { "viewpoint" : 1 } }, "service_version" : "3.0", "is_saved_as_template" : false, "resource_order_id" : "029b34a69efd48769215e429deff0cec"}
  • 响应参数 状态码: 200 表14 响应Body参数 参数 参数类型 描述 tasks Array of tasks objects 任务创建成功生成的任务ID列表 表15 tasks 参数 参数类型 描述 id String 任务创建成功生成的任务ID 状态码: 400 表16 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息描述 detail String 错误详情 params Array of strings 错误参数列举 reason String 错误原因 advice String 建议 状态码: 500 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息描述 detail String 错误详情 params Array of strings 错误参数列举 reason String 错误原因 advice String 建议
  • 响应参数 状态码: 200 表15 响应Body参数 参数 参数类型 描述 tasks Array of TaskResponse objects VIAS平台创建作业的作业id列表 表16 TaskResponse 参数 参数类型 描述 id String VIAS平台创建的作业id。 状态码: 400 表17 响应Body参数 参数 参数类型 描述 error_code String 错误码。 error_msg String 错误信息描述。 detail String 错误详情。 params Array of strings 错误参数列举。 数组长度:0 - 1 reason String 错误原因。 advice String 建议。 状态码: 500 表18 响应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-detection-cloud/tasks{ "name" : "vehicle-task", "description" : "vehicle 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" : { "target_roi" : "{\"lines\":[{\"data\":[[50,756],[100,616]],\"properties\":{\"type\":0}},{\"data\":[[50,256],[100,116]],\"properties\":{\"type\":1}}],\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}", "license_plate" : { "local_city" : "B", "local_province" : "津" }, "output_image_sw" : 1, "image_compression_ratio" : 100 } }} 云上视频车辆作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-vehicle-detection-cloud/tasks{ "name" : "vehicle-task", "description" : "vehicle 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" : { "target_roi" : "{\"lines\":[{\"data\":[[50,756],[100,616]],\"properties\":{\"type\":0}},{\"data\":[[50,256],[100,116]],\"properties\":{\"type\":1}}],\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}", "license_plate" : { "local_city" : "B", "local_province" : "津" }, "output_image_sw" : 1, "image_compression_ratio" : 100 } }} 云上视频车辆作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-vehicle-detection-cloud/tasks{ "name" : "vehicle-task", "description" : "vehicle 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" : { "target_roi" : "{\"lines\":[{\"data\":[[50,756],[100,616]],\"properties\":{\"type\":0}},{\"data\":[[50,256],[100,116]],\"properties\":{\"type\":1}}],\"polygons\":[{\"data\":[[487,465],[1850,450],[1905,1013],[515,1050]]}]}", "license_plate" : { "local_city" : "B", "local_province" : "津" }, "output_image_sw" : 1, "image_compression_ratio" : 100 } }}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 count Integer 边缘资源池总量 edge_pools Array of EdgePoolListItemDto objects 边缘资源池列表响应体 表5 EdgePoolListItemDto 参数 参数类型 描述 id String 边缘池ID name String 边缘池名称 state String 边缘池状态 project_id String 用户项目ID workspace_id String 工作空间ID created_at Long 创建时间 updated_at Long 更新时间 description String 描述信息 状态码: 400 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息描述 detail String 错误详情 params Array of strings 错误参数列举 reason String 错误原因 advice String 建议 状态码: 500 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 error_msg String 错误信息描述 detail String 错误详情 params Array of strings 错误参数列举 reason String 错误原因 advice String 建议
  • URI GET /v2/{project_id}/edge-pools 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID,获取方法参见获取项目ID和名称 表2 Query参数 参数 是否必选 参数类型 描述 is_paged 否 Boolean 是否分页 page_size 否 Integer 第几页 page_num 否 Integer 页大小 name_like 否 String 模糊查询名称,满足正则表达式^[a-z0-9-]{1,30}$ order_by 否 String 排序方式,根据传入的sort_name的值进行正序或倒序地排序。asc为正序,desc为倒序。 枚举值: asc desc sort_name 否 String 排序字段。枚举值: created_at updated_at state 否 String 状态筛选,单选。枚举值: Running Abnormal
  • 响应示例 状态码: 200 获取边缘资源池列表响应体 { "count" : 2, "edge_pools" : [ { "id" : "xxx", "name" : "test1", "state" : "Running", "project_id" : "xxx", "workspace_id" : "0", "created_at" : 1685611513591, "updated_at" : 1685611513591 }, { "id" : "xxx", "name" : "test2", "state" : "Running", "project_id" : "xxx", "workspace_id" : "0", "created_at" : 1683344661036, "updated_at" : 1683344661036 } ]}
共99354条