华为云用户手册

  • 请求示例 云上城市垃圾桶满溢检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-urban-trash-overflow-edge/tasks { "name" : "urban-trash-task", "description" : "urban-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" : { "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-urban-trash-overflow-edge/tasks { "name" : "urban-trash-task", "description" : "urban-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" : { "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-urban-trash-overflow-edge/tasks { "name" : "urban-trash-task", "description" : "urban-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" : { "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-manholecover-miss-edge/tasks { "name" : "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\"}]}" } } } 边缘城管事件-井盖缺失检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-urban-manholecover-miss-edge/tasks { "name" : "manholecovermiss-detect-task", "description" : "manholecovermiss 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-manholecover-miss-edge/tasks { "name" : "manholecovermiss-detect-task", "description" : "manholecovermiss 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-manholecover-miss-edge/tasks { "name" : "manholecovermiss-detect-task", "description" : "manholecovermiss 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-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 建议。
  • 错误码 调用API出错后,将不会返回结果数据。调用方可根据每个API对应的错误码来定位错误原因。当调用出错时,HTTP请求返回一个4xx或5xx的状态码。返回的消息体中是具体的错误代码及错误信息。在调用方找不到错误原因时,可以联系客服,并提供错误码,以便尽快帮您解决问题。 异常响应示例 { "error_code": "VIAS.00010006", "error_msg": "An internal error occurs.", "detail": "Request method 'GET' not supported", "params": [], "reason": "An internal error occurs.", "advice": "An internal error occurs." } 参数说明 参数名称 描述信息 error_code 错误码。 error_msg 错误信息。 detail 错误详情。 params 涉及参数。 reason 原因。 advice 处理建议。 错误码说明 状态码 错误码 错误信息 描述 处理措施 400 VIAS.00010001 The parameters are invalid. 参数非法。 请确保输入的参数合法。 400 VIAS.00010002 The object does not exist. 指定对象不存在。 检查配置。 400 VIAS.00010003 The object already exists. 对象已存在。 使用或创建另一个对象。 400 VIAS.00010004 The object or parameter is invalid. 对象或参数无效。 确认对象或参数的格式。 401 VIAS.00010005 Authorization failed. 鉴权失败。 检查用户权限。 500 VIAS.00010006 An internal error occurs. 内部错误。 内部错误,结合日志定位。 400 VIAS.00010007 No task is found based on the task ID. 根据任务ID找不到相应的任务。 请检查您的任务ID。 400 VIAS.00010008 No task is found based on the ID. 根据ID找不到相应的任务。 请检查您的ID。 500 VIAS.00010009 The serviced failed to be accessed. (Internal error) 访问服务失败。 内部错误,结合日志定位。 400 VIAS.00010010 There is a video source with the same name. 已有同名视频源。 修改视频源名称。 400 VIAS.00010011 There is a job with the same name. 已有同名作业。 修改作业名称。 500 VIAS.00010012 This operation is not allowed. (Internal error) 此操作不允许。 内部错误,结合日志定位。 500 VIAS.00010013 Requests are sent too frequently. 请求过于频繁。 请稍后重试。 500 VIAS.00010014 This operation is forbidden. (Internal error) 禁止该操作。 内部错误,结合日志定位。 500 VIAS.00010015 The resource is not found. (Internal error) 资源未找到。 内部错误,结合日志定位。 500 VIAS.00010016 Dependent services are unavailable. (Internal error) 依赖服务不可用。 内部错误,检查依赖服务的状态。 400 VIAS.00010017 The resource code is duplicate. (Internal error) 资源编码重复。 内部错误,结合日志定位。 400 VIAS.00010018 The video source configuration is invalid. 视频源配置参数无效。 请检查配置参数是否合法。 400 VIAS.00010019 The project ID is invalid. 项目ID无效。 检查项目id是否正确。 500 VIAS.00010020 An error occurs on the agency client. (Internal error) 委托客户端错误。 内部错误,结合日志定位。 401 VIAS.00010021 The account is restricted, frozen, or unauthenticated. 账户已被限制、冻结或未经身份验证。 进行实名认证。 400 VIAS.00010022 The database entity object is not found. (Internal error) 数据库实体对象未找到。 内部错误,检查实体对象不存在的原因。 500 VIAS.00010023 Token authentication failed or the permission is insufficient. (Internal error) token认证失败或权限不足。 内部错误,检查请求的权限。 500 VIAS.00010024 The request is invalid. (Internal error) 请求不合法。 内部错误,检查请求的权限。 500 VIAS.00010025 A network error occurs when the dependent service is accessed. 与依赖服务间存在网络错误。 内部错误,检查与依赖服务间的网络状态。 500 VIAS.00010026 The internal response body cannot be analyzed. (Internal error) 内部响应体无法分析。 内部错误,检查内部响应体格式。 500 VIAS.00010027 The agency parameters are invalid. (Internal error) 委托参数无效。 内部错误,检查委托操作的请求参数。 500 VIAS.00010028 An IAM service exception occurs. (Internal error) IAM服务端异常。 内部错误,检查IAM服务状态。 500 VIAS.00010029 The maximum number of agencies has been reached. (Internal error) 委托数量达到最大限制。 内部错误,删除其他委托。 500 VIAS.00010030 The current zone has the same name as the trusted zone. (Internal error) 当前域与信任域同名。 内部错误,当前域与信任域名称不能相同。 500 VIAS.00010031 The agency is not found. (Internal error) 委托无法找到。 内部错误,结合日志定位。 500 VIAS.00010032 The trusted zone name is incorrect. (Internal error) 信任域名错误。 内部错误,检查信任域参数。 500 VIAS.00010033 Deleting the agency failed. (Internal error) 委托删除失败。 内部错误,检查数据库表操作。 500 VIAS.00010034 Updating the agency failed. (Internal error) 委托更新失败。 内部错误,检查数据库表操作。 500 VIAS.00010035 An agency with the same name already exists. (Internal error) 委托已经存在。 内部错误,无需创建委托,或创建其他委托。 500 VIAS.00010036 An interrupt exception occurs when the IAM API is called. (Internal error) 请求IAM接口发生中断异常。 内部错误,检查请求。 500 VIAS.00010037 An exception occurs when the IAM API is called. (Internal error) 请求IAM接口时异常。 内部错误,检查请求。 500 VIAS.00010038 The request body for calling the IAM API is invalid. (Internal error) 请求IAM接口时,构造的请求体不合法。 内部错误,检查构造的请求体。 500 VIAS.00010039 Failed to verify the image repository. (Internal error) 镜像仓校验失败。 内部错误,检查内部token是否成功获取。 400 VIAS.00010040 The account type is not supported. 不支持的账号类型。 请使用非op_svc账号登录。 400 VIAS.0010045 The OBS object does not exist. OBS对象不存在。 请选择已有的OBS对象。 400 VIAS.0010046 IVM has not been enabled. IVM服务未开通。 请开通IVM服务。 400 VIAS.0010047 The maximum number of video sources has been reached. 视频源配额超过上限。 请联系管理员调整配额。 400 VIAS.0010048 The maximum number of tasks has been reached. 任务配额超过上限。 请联系管理员调整配额。 400 VIAS.00010050 Pool quota exceeds the upper limit. 资源池创建已达上限。 请购买更多许可或删除空闲资源池。 400 VIAS.00010051 do not match unique constraint. 唯一性校验失败。 检查参数唯一性。 父主题: 附录
  • 响应参数 状态码: 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 建议。
  • 请求示例 边缘消防通道占用检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-fire-exit-occupation-edge/tasks { "name" : "fireexit-task", "description" : "fireexit 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, "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "stacking_occupation_sw" : 1, "vehicle_occupation_sw" : 1, "stacking_residence_time" : 40, "vehicle_residence_time" : 50, "target_roi" : "{\"polygons\":[{\"data\":[[0, 0], [0, 1000], [1920, 1000], [1920, 0]]}]}" } } } 边缘消防通道占用检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-fire-exit-occupation-edge/tasks { "name" : "fireexit-task", "description" : "fireexit 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, "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "stacking_occupation_sw" : 1, "vehicle_occupation_sw" : 1, "stacking_residence_time" : 40, "vehicle_residence_time" : 50, "target_roi" : "{\"polygons\":[{\"data\":[[0, 0], [0, 1000], [1920, 1000], [1920, 0]]}]}" } } } 边缘消防通道占用检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-fire-exit-occupation-edge/tasks { "name" : "fireexit-task", "description" : "fireexit 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, "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "stacking_occupation_sw" : 1, "vehicle_occupation_sw" : 1, "stacking_residence_time" : 40, "vehicle_residence_time" : 50, "target_roi" : "{\"polygons\":[{\"data\":[[0, 0], [0, 1000], [1920, 1000], [1920, 0]]}]}" } } } 边缘消防通道占用检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-fire-exit-occupation-edge/tasks { "name" : "fireexit-task", "description" : "fireexit 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, "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "stacking_occupation_sw" : 1, "vehicle_occupation_sw" : 1, "stacking_residence_time" : 40, "vehicle_residence_time" : 50, "target_roi" : "{\"polygons\":[{\"data\":[[0, 0], [0, 1000], [1920, 1000], [1920, 0]]}]}" } } }
  • 请求示例 云上船只入侵检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/ship-intrusion-cloud/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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]]}]}" } } } 云上船只入侵检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/ship-intrusion-cloud/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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]]}]}" } } } 云上船只入侵检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/ship-intrusion-cloud/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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]]}]}" } } }
  • 响应参数 状态码: 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,输出为webhook。 POST /v2/{project_id}/services/ship-intrusion-edge/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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" : { "image_compression_ratio" : 90, "render_roi_sw" : 1, "render_result_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}" } } } 边缘船只入侵检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/ship-intrusion-edge/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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]]}]}" } } } 边缘船只入侵检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/ship-intrusion-edge/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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]]}]}" } } } 边缘船只入侵检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/ship-intrusion-edge/tasks { "name" : "ship-intrusion-task", "description" : "ship-intrusion 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]]}]}" } } }
  • 响应参数 状态码: 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-crowdcount-edge/tasks { "name" : "crowdcount-edge-task", "description" : "Crowdcounttedetection 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" : { "banner_detection_sw" : 1, "banner_threshold" : "2", "alarm_threshold" : "5", "sampling_time_interval" : 8, "density_sw" : 1, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 边缘高密度人群统计作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-crowdcount-edge/tasks { "name" : "crowdcount-edge-task", "description" : "Crowdcounttedetection 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" : { "banner_detection_sw" : 1, "banner_threshold" : "2", "alarm_threshold" : "5", "sampling_time_interval" : 8, "density_sw" : 1, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 边缘高密度人群统计作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-crowdcount-edge/tasks { "name" : "crowdcount-edge-task", "description" : "Crowdcounttedetection task test", "input" : { "type" : "edgecamera", "data" : [ { "id" : "aec5857c-222f-4aa9-be39-23654e118886", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "crowdcount-edge" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "banner_detection_sw" : 1, "banner_threshold" : "2", "alarm_threshold" : "5", "sampling_time_interval" : 8, "density_sw" : 1, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } } 边缘高密度人群统计作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-crowdcount-edge/tasks { "name" : "crowdcount-edge-task", "description" : "Crowdcounttedetection 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" : { "banner_detection_sw" : 1, "banner_threshold" : "2", "alarm_threshold" : "5", "sampling_time_interval" : 8, "density_sw" : 1, "visualization_output_sw" : 1, "image_compression_ratio" : 80, "target_roi" : "{\"polygons\":[{\"data\":[[100,100],[1800,100],[1800,1000],[100,1000]]}]}" } } }
  • 请求示例 边缘高点超速检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks { "name" : "highpoint-overspeed-task", "description" : "highpoint-overspeed 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\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}", "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]", "speed_threshold" : 40, "render_result_sw" : 1, "render_roi_sw" : 1, "image_compression_ratio" : 100 } } } 边缘高点超速检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks { "name" : "highpoint-overspeed-task", "description" : "highpoint-overspeed 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\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}", "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]", "speed_threshold" : 40, "render_result_sw" : 1, "render_roi_sw" : 1, "image_compression_ratio" : 100 } } } 边缘高点超速检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks { "name" : "highpoint-overspeed-task", "description" : "highpoint-overspeed 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\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}", "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]", "speed_threshold" : 40, "render_result_sw" : 1, "render_roi_sw" : 1, "image_compression_ratio" : 100 } } } 边缘高点超速检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-highpoint-overspeed-edge/tasks { "name" : "highpoint-overspeed-task", "description" : "highpoint-overspeed 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\":[[268,361],[386,556],[539, 506],[364,332]]},{\"data\":[[474,689],[758,1070],[1183,1070],[668,627]]}]}", "camera_calibration" : "[75.318722,63.472760,3372.332762,-20.421955,0.031882]", "speed_threshold" : 40, "render_result_sw" : 1, "render_roi_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-intrusiondetection-edge/tasks { "name" : "intrusiondetection-task", "description" : "intrusiondetection task test", "input" : { "type" : "video_source", "data" : [ { "video_source_id" : "xxxxxxx-xxxxxxx-xxxxxxx-xxxxx-xxxxxx" } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "car_detection_sw" : 0, "person_detection_sw" : 1, "detection_min_size" : 60, "detection_max_size" : 1080, "line_detection_sw" : 1, "region_detection_sw" : 1, "loitering_detection_sw" : 0, "loitering_send_interval" : 300, "image_compression_ratio" : 90, "render_result_sw" : 1, "all_print_sw" : 0, "render_roi_sw" : 1, "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}" } } } 边缘入侵检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks { "name" : "intrusiondetection-task", "description" : "intrusiondetection task test", "input" : { "type" : "edgecamera", "data" : [ { "id" : "aec5857c-222f-4aa9-be39-23654e118886", "index" : 0 } ] }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "car_detection_sw" : 0, "person_detection_sw" : 1, "detection_min_size" : 60, "detection_max_size" : 1080, "line_detection_sw" : 1, "region_detection_sw" : 1, "loitering_detection_sw" : 0, "loitering_send_interval" : 300, "image_compression_ratio" : 90, "render_result_sw" : 1, "all_print_sw" : 0, "render_roi_sw" : 1, "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}" } } } 边缘入侵检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks { "name" : "intrusiondetection-task", "description" : "intrusiondetection task test", "input" : { "type" : "restful", "data" : [ { "url" : "https://restfultest", "certificate_check" : false, "node_id" : "aec5857c-222f-4aa9-be39-23654e118886", "rtsp_path_in_response" : "http://testpath" } ] }, "output" : { "webhook" : { "url" : "https://127.0.0.1:8080/webhook", "headers" : { "x-auth-token" : "tokentest" } } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "car_detection_sw" : 0, "person_detection_sw" : 1, "detection_min_size" : 60, "detection_max_size" : 1080, "line_detection_sw" : 1, "region_detection_sw" : 1, "loitering_detection_sw" : 0, "loitering_send_interval" : 300, "image_compression_ratio" : 90, "render_result_sw" : 1, "all_print_sw" : 0, "render_roi_sw" : 1, "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}" } } } 边缘入侵检测作业创建,使用输入源为VCN,输出为dis POST /v2/{project_id}/services/c-intrusiondetection-edge/tasks { "name" : "intrusiondetection-task", "description" : "intrusiondetection task test", "input" : { "type" : "vcn", "data" : [ { "device_id" : "aec5857c-222f-4aa9-be39-23654e118886", "stream_type" : 2 } ], "vcn" : { "ip" : "127.0.0.1", "port" : 8080, "username" : "vcntest", "password" : "123456abcd" } }, "output" : { "dis" : { "stream_name" : "dis-test" } }, "service_version" : "3.0", "resource_order_id" : "840a5cf90d4a4bbaa71f251dfe8fe64e", "config" : { "common" : { "car_detection_sw" : 0, "person_detection_sw" : 1, "detection_min_size" : 60, "detection_max_size" : 1080, "line_detection_sw" : 1, "region_detection_sw" : 1, "loitering_detection_sw" : 0, "loitering_send_interval" : 300, "image_compression_ratio" : 90, "render_result_sw" : 1, "all_print_sw" : 0, "render_roi_sw" : 1, "target_roi" : "{\"lines\":[{\"data\":[[560,680],[1185,506]],\"properties\":{\"side1_name\":\"Side1\",\"side2_name\":\"Side2\"}}],\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}" } } }
  • 请求示例 边缘打架检测作业创建,使用输入源为video_source,输出为webhook。 POST /v2/{project_id}/services/c-fightdetect-edge/tasks { "name" : "fight-detection-task", "description" : "fight 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" : { "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 } } } 边缘打架检测作业创建,使用输入源为vcn,输出为dis。 POST /v2/{project_id}/services/c-fightdetect-edge/tasks { "name" : "fight-detection-task", "description" : "fight 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" : { "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 } } } 边缘打架检测作业创建,使用输入源为边缘摄像头,输出为dis。 POST /v2/{project_id}/services/c-fightdetect-edge/tasks { "name" : "fight-detection-task", "description" : "fight 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" : { "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 } } } 边缘打架检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-fightdetect-edge/tasks { "name" : "fight-detection-task", "description" : "fight 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" : { "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 建议。
  • 响应参数 状态码: 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 表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-pose-action-recog-cloud/tasks { "name" : "pose-action-detection-task", "description" : "pose-action 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" : { "climb_detection_sw" : 1, "fall_detection_sw" : 0, "wave_detection_sw" : 0, "bend_detection_sw" : 0, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "image_compression_ratio" : 90 } } } 云上个体事件动作检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-pose-action-recog-cloud/tasks { "name" : "pose-action-detection-task", "description" : "pose-action 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" : { "climb_detection_sw" : 1, "fall_detection_sw" : 0, "wave_detection_sw" : 0, "bend_detection_sw" : 0, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[0,0],[0,1080],[1920,1080],[1920,0]]}]}", "image_compression_ratio" : 90 } } } 云上个体事件动作检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-pose-action-recog-cloud/tasks { "name" : "pose-action-detection-task", "description" : "pose-action 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" : { "climb_detection_sw" : 1, "fall_detection_sw" : 0, "wave_detection_sw" : 0, "bend_detection_sw" : 0, "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-safetysuitedetection-cloud/tasks { "name" : "safetysuite-detection-task", "description" : "safetysuite 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" : { "hat_detection_sw" : 0, "cloth_detection_sw" : 1, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio" : 90 } } } 云上工服工帽检测作业创建,使用输入源为url,输出为dis。 POST /v2/{project_id}/services/c-safetysuitedetection-cloud/tasks { "name" : "safetysuite-detection-task", "description" : "safetysuite 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" : { "hat_detection_sw" : 0, "cloth_detection_sw" : 1, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio" : 90 } } } 云上工服工帽检测作业创建,使用输入源为obs,输出为dis。 POST /v2/{project_id}/services/c-safetysuitedetection-cloud/tasks { "name" : "safetysuite-detection-task", "description" : "safetysuite 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" : { "hat_detection_sw" : 0, "cloth_detection_sw" : 1, "render_result_sw" : 1, "render_roi_sw" : 1, "target_roi" : "{\"polygons\":[{\"data\":[[84,389],[1840,349],[1824,526],[78,526]]}]}", "image_compression_ratio" : 90 } } }
  • 请求示例 边缘城管事件-动态视角井盖缺失检测作业创建,使用输入源为VCN,输出为dis。 POST /v2/{project_id}/services/c-mobile-manholecover-edge/tasks { "name" : "mobile-manholecovermiss-detect-task", "description" : "manholecovermiss 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\"}]}" } } } 边缘城管事件-动态视角井盖缺失检测作业创建,使用输入源为restful,输出为webhook。 POST /v2/{project_id}/services/c-mobile-manholecover-edge/tasks { "name" : "mobile-manholecovermiss-detect-task", "description" : "manholecovermiss 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-mobile-manholecover-edge/tasks { "name" : "mobile-manholecovermiss-detect-task", "description" : "manholecovermiss 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\"}]}" } } } 边缘城管事件-动态视角井盖缺失检测作业创建,使用输入源为video_source,输出为dis。 POST /v2/{project_id}/services/c-mobile-manholecover-edge/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\"}]}" } } }
  • 响应参数 状态码: 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 建议。
共100000条