华为云用户手册

  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 total Integer 满足条件的设备告警总数 data Array of GetDeviceAlarmArrayObject objects 设备告警实体列表 表5 GetDeviceAlarmArrayObject 参数 参数类型 描述 id String 设备告警记录ID name String 设备告警名称 alarm_id Integer 设备告警ID level String 设备告警等级,紧急告警(critical),严重告警(major),一般告警(minor) platform String 设备平台 impact String 设备告警的影响 detail String 设备告警详情内容 reason String 设备告警原因 deal_suggestion String 设备告警处理建议 create_time Long 创建时间(时间戳)
  • 响应示例 状态码: 200 获取设备告警列表成功 { "total" : 0, "data" : [ { "id" : "6b0e806f35c2470a825da1f1ab05caf5", "name" : "安装在设备HiLens_69上的技能test-unzip异常且无法恢复", "alarm_id" : 5, "level" : "critical", "platform" : "hilens", "impact" : "业务中断", "detail" : "多次尝试恢复技能均失败", "reason" : "技能10分钟内退出就会被认为是异常退出", "deal_suggestion" : "查看Log分析原因", "create_time" : 1636451227616 } ]}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 count Integer 满足条件的激活记录总数 records Array of records objects 激活记录列表 表5 records 参数 参数类型 描述 update_time String 更新时间 active_status String 激活状态 project_id String 项目ID node_id String 节点ID
  • 请求示例 获取激活记录列表 GET https://{endpoint}/v3/{project_id}/ai-mgr/nodes/{node_id}/activation/recordsRequest Header: Content-Type: application/jsonX-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG..
  • 响应示例 状态码: 200 激活记录列表 { "count" : 2, "records" : [ { "update_time" : "2022-04-11 17:14:22 GMT+08:00", "active_status" : "INACTIVE", "project_id" : "fff47e1722f94c4e98531bae56821372", "node_id" : "hilens-9b0dd8dbad854554b23813d849bf51ad" }, { "update_time" : "2022-04-11 17:17:33 GMT+08:00", "active_status" : "ACTIVATED", "project_id" : "fff47e1722f94c4e98531bae56821372", "node_id" : "hilens-9b0dd8dbad854554b23813d849bf51ad" } ]}
  • URI GET /v3/{project_id}/ai-mgr/nodes/{node_id}/activation/records 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。获取方法请参见获取项目ID node_id 是 String 设备ID,从专业版HiLens控制台设备管理查询设备列表获取 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 查询的起始位置,取值范围为非负整数,默认为0 limit 否 Integer 每页显示的条目数量,取值范围1~100,默认为100
  • URI GET /v1/{project_id}/alarm-manager/alarms 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID。获取方法请参见获取项目ID 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 查询的起始位置,取值范围为非负整数,默认为0 limit 否 Integer 每页显示的条目数量,取值范围1~100,默认为100 device_id 否 String 设备ID
  • 响应示例 状态码: 200 请求成功 { "template" : { "configs" : { "migration" : false, "host_network" : false, "host_pid" : false, "restart_policy" : "Always", "toleration_seconds" : 0 }, "apps" : [ { "name" : "example1-skill-name", "args" : [ ], "command" : [ "--log_dir=/train --learning_rate=0.01 --batch_size=150" ], "resources" : { "limits" : { "cpu" : "0.25", "memory" : "128" }, "requests" : { } }, "envs" : [ { "name" : "IVA_SVC_CONFIG", "value" : "{\"algorithm\":{\"multiTask\":\"no\",\"algType\":\"hilens\"},\"cloud\":{\"disEndpoint\":\"https://dis.cn-north-7.myhuaweicloud.com\",\"region\":\"cn-north-7\"},\"svcInstanceId\":\"modelbox-instance-xxxx\"}" } ], "msgs" : [ ], "ports" : [ { "container_port" : 10, "host_port" : 23, "host_ip" : "10.10.10.10" } ], "privileged" : false, "volumes" : [ { "name" : "tmp", "type" : "emptyDir", "source" : "memory", "destination" : "/tmp", "read_only" : false }, { "name" : "run", "type" : "emptyDir", "source" : "memory", "destination" : "/run", "read_only" : false }, { "name" : "cgroup", "type" : "hostPath", "source" : "/sys/fs/cgroup", "destination" : "/sys/fs/cgroup", "read_only" : true } ], "app_url" : "xxx", "is_modelbox" : true } ] }, "reason" : null, "ready_replicas" : 0, "replicas" : 1, "description" : "", "created_at" : "2022-01-25 15:57:07 GMT+08:00", "source" : "userdefined", "api_version" : null, "node_ids" : [ "hilens-e17b497c3a00406f89f605e5c16b40d7" ], "result" : [ { "node_id" : "hilens-e17b497c3a00406f89f605e5c16b40d7" } ], "cluster_id" : "", "updated_at" : "2022-01-25 15:57:07 GMT+08:00", "project_id" : "fff47e1722f94c4e98531bae56821372", "name" : "example1", "id" : "hilens-9eebd2c03a2e48a6a47949fcb4f3f66f", "state" : "CREATING"}
  • URI GET /v3/{project_id}/ai-mgr/deployments/{deployment_id} 表1 路径参数 参数 是否必选 参数类型 描述 deployment_id 是 String 应用部署ID project_id 是 String 项目ID,获取方法请参见获取项目ID 表2 Query参数 参数 是否必选 参数类型 描述 provider 否 String 平台提供者,分别为hilens及ief。当为hilens时,请求部署在hilens平台的相关数据。
  • 请求示例 获取部署的详情信息。 GET https://{endpoint}/v3/{project_id}/ai-mgr/deployments/{deployment_id}Request Header: Content-Type: application/jsonX-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
  • 响应示例 状态码: 200 请求成功 { "count" : 1, "pods" : [ { "configs" : { "migration" : false, "host_network" : false, "host_pid" : false, "restart_policy" : "Always", "toleration_seconds" : 0 }, "reason" : "open /home/hilens/apps/test-rpm-hilens-41f6382c44b94d8abaea5129a54121b0/packages/base64_decoder.toml: no such file or directory", "host_ip" : "192.168.2.111", "created_at" : "2021-12-08 19:09:27 GMT+08:00", "cluster_id" : null, "updated_at" : "2021-12-08 20:26:20 GMT+08:00", "project_id" : "fff47e1722f94c4e98531bae56821372", "name" : "12312312313_test-rpm_0", "id" : "hilens-12312312313_test-rpm_0", "deployment_id" : "hilens-413a558214814d249d43988cc1f788b6", "affinity" : null, "apps" : [ { "name" : "test-rpm", "args" : [ ], "command" : [ ], "resources" : { "limits" : { "cpu" : "0.25", "memory" : "128" }, "requests" : { } }, "envs" : [ ], "msgs" : [ ], "ports" : [ ], "privileged" : false, "version" : "1.0.0", "volumes" : [ ], "app_url" : "xxx", "app_order_id" : "702786922fc74954818e549383306d30", "is_modelbox" : false } ], "node_id" : "hilens-8977fd2811464c1bb19eeb1939142841", "status" : "Failed" } ]}
  • URI GET /v3/{project_id}/ai-mgr/pods 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 项目ID,获取方法请参见获取项目ID 表2 Query参数 参数 是否必选 参数类型 描述 cluster_id 否 String 集群ID,查询部署在该节点组的应用列表,和node_id不可同时请求 node_id 否 String 节点ID,查询部署在该节点下的应用列表,和cluster_id不可同时请求 provider 否 String 平台提供者,分别为hilens及ief。当为hilens时,请求部署在hilens平台的相关数据 deployment_id 否 String 应用部署ID workspace_id 否 String 工作空间ID,默认为注册账号/子账号的default工作空间。主账号默认ID为0,子账号默认空间id为该子账号user_id offset 否 Integer 查询的起始位置,取值范围为非负整数,默认为0 limit 否 Integer 每页显示的条目数量,取值范围1~100,默认为100
  • 响应示例 状态码: 200 技能列表 { "data" : [ { "sub_scenes" : "行人轨迹", "app_template_id" : null, "icon" : null, "version_num" : 1, "description" : null, "product_info" : [ ], "type" : "standard", "platform" : "Linux", "self_dev_flag" : 1, "measure_type" : "physical_src", "approval_result" : "ok", "update_time" : "2022-06-30 17:22:48 GMT+08:00", "channel_limit" : 16, "publish_time" : "2022-06-30 17:24:07 GMT+08:00", "resource_step_size" : 1, "approval_time" : "2022-06-30 17:22:48 GMT+08:00", "cloud_service_type" : null, "summary" : null, "test_status" : 0, "chip" : "Ascend 310", "is_verify_model" : false, "format" : "file", "resource_type" : null, "version" : "1.0.0", "measure_unit" : "qps", "tags" : [ ], "size" : 1439, "test_result" : null, "install_times" : 0, "privacy_policy" : [ ], "name" : "createmOXIL", "scenes" : [ ], "charge_model" : 2, "resource_spec_code" : null, "skill_id" : "dc7751f1896d46eba688765d72615de0", "developer" : "EI_HiLens_1", "main_scenes" : "园区", "device_types" : [ ], "status" : 1 } ], "total" : 10500}
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 data Array of SkillInfo objects 技能列表 total Integer 总数量 表4 SkillInfo 参数 参数类型 描述 sub_scenes String 技能应用场景 app_template_id String 应用模板ID icon String 技能图标 version_num Integer 技能版本数量 description String 技能描述 product_info Array of strings 计费编码信息 type String 技能类别,分为standard和lite platform String 技能操作系统平台,其值为:Linux,Android, iOS, LiteOS,Windows self_dev_flag Integer 自研标识,1表示是HiLens自研算法。 measure_type String 计费类型,physical_src表示物理量标,如按周期收费。 src表示一次性 approval_result String 技能审核结果 update_time String 更新时间,形如2022-06-30 17:22:48 GMT+08:00 channel_limit Integer 通道数 publish_time String 发布时间 resource_step_size Integer 步长 approval_time String 审批时间 cloud_service_type String 云服务编码 summary String 摘要 test_status Integer 测试状态 chip String 芯片 is_verify_model Boolean 是否校验模型 format String 技能类型,文件类型file,镜像类型iamge resource_type String 资源类别 version String 技能版本 measure_unit String 计费单位 qps 表示按qps收费,road表示技能路数instance 表示按实例收费 tags Array of strings 标签 size Integer 技能大小 test_result String 测试结果 install_times Integer 安装次数 privacy_policy Array of strings 隐私条款 name String 技能名字 scenes Array of strings 技能场景 charge_model Integer 计费模式 resource_spec_code String 云服务资源编码 skill_id String 技能ID developer String 开发者名字 main_scenes String 主场景 device_types Array of strings 所支持的设备类别 status Integer 技能状态
  • 请求示例 删除指定应用部署 DELETE https://{endpoint}/v3/{project_id}/ai-mgr/deployments/{deployment_id}Request Header: Content-Type: application/jsonX-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 租户Token。获取方法请参见 获取Token 表3 请求Body参数 参数 是否必选 参数类型 描述 name 是 String 工作空间名 enterprise_project_id 是 String 企业项目id,默认为0 enterprise_project_name 是 String 企业项目名,默认为default description 否 String 工作空间描述
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 deployment_id String 部署Id 状态码: 401 表5 响应Body参数 参数 参数类型 描述 request_id String 请求ID error_code String 错误码 error_message String 错误信息 状态码: 403 表6 响应Body参数 参数 参数类型 描述 request_id String 请求ID error_code String 错误码 error_message String 错误信息 状态码: 404 表7 响应Body参数 参数 参数类型 描述 request_id String 请求ID error_code String 错误码 error_message String 错误信息 状态码: 500 表8 响应Body参数 参数 参数类型 描述 request_id String 请求ID error_code String 错误码 error_message String 错误信息
  • URI DELETE /v3/{project_id}/ai-mgr/deployments/{deployment_id} 表1 路径参数 参数 是否必选 参数类型 描述 deployment_id 是 String 部署ID project_id 是 String 项目ID,获取方法请参见获取项目ID 表2 Query参数 参数 是否必选 参数类型 描述 force_delete 否 Boolean 强制删除,为true时表示前置删除 provider 否 String 平台提供者,分别为hilens及ief。当为hilens时,请求部署在hilens平台的相关数据
  • 响应示例 状态码: 200 请求成功 { "secret" : { "id" : "string", "name" : "string", "description" : "string", "workspace_id" : "string", "project_id" : "string", "created_at" : "string", "updated_at" : "string", "secrets" : [ { "key" : "string", "value" : "string" } ], "tags" : [ { "key" : "string", "value" : "string" } ] }}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 order_id String 订单ID 状态码: 401 表5 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 403 表6 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 404 表7 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512 状态码: 500 表8 响应Body参数 参数 参数类型 描述 error_code String 错误码 最小长度:8 最大长度:36 error_msg String 错误描述 最小长度:2 最大长度:512
  • 请求示例 获取密钥详情 GET https://{endpoint}/v3/{project_id}/ai-mgr/secrets/{secret_id}Request Header: Content-Type: application/jsonX-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 secret SecretDetail object 获取密钥详情响应 表4 SecretDetail 参数 参数类型 描述 workspace_id String 工作空间ID id String 密钥ID name String 密钥名称 description String 密钥描述 project_id String 项目ID created_at String 密钥创建时间 updated_at String 密钥更新时间 secrets Array of Secret objects 密钥列表 tags Array of Tag objects 标签列表 表5 Secret 参数 参数类型 描述 key String 密钥key,最大长度63个字符。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_” value String 密钥value,每个值最大长度10000个字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_” 表6 Tag 参数 参数类型 描述 key String 标签key,最大长度36个字符。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_” value String 标签value,每个值最大长度43个字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”
  • 请求示例 删除某个配置项 DELETE https://{endpoint}/v3/{project_id}/ai-mgr/configmaps/{config_map_id}Request Header: Content-Type: application/jsonX-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
  • 请求示例 获取某个配置项详情 GET https://{endpoint}/v3/{project_id}/ai-mgr/configmaps/{config_map_id}Request Header: Content-Type: application/jsonX-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 configmap ConfigMap object 配置项详情 workspace_id String 工作空间ID,默认为注册账号/子账号的default工作空间,可通过专业版HiLens控制台展开工作空间列表获取到工作空间ID 表4 ConfigMap 参数 参数类型 描述 configs Array of Config objects 配置列表 created_at String 创建时间 description String 描述 id String 配置项ID name String 名称 project_id String 项目ID tags Array of Tag objects 标签列表 type String 类型 updated_at String 更新时间 workspace_id String 工作空间ID 表5 Config 参数 参数类型 描述 key String 配置项key,最大长度63个字符。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_” value String 配置项value,每个值最大长度10000个字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_” 表6 Tag 参数 参数类型 描述 key String 标签键,最大长度36个字符。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_” value String 标签值,每个值最大长度43个字符,删除时如果value有值按照key/value删除,如果value没值,则按照key删除。不能为空,只能包含大小写字母,数字,中划线“-”,下划线“_”
  • 响应示例 状态码: 200 请求成功 { "configmap" : { "configs" : [ { "key" : "string", "value" : "string" } ], "created_at" : "string", "description" : "string", "id" : "string", "name" : "string", "project_id" : "string", "tags" : [ { "key" : "string", "value" : "string" } ], "type" : "string", "updated_at" : "string", "workspace_id" : "string" }, "workspace_id" : "string"}
  • 响应示例 状态码: 200 技能详情 { "sub_scenes" : "行人轨迹", "icon" : null, "version_num" : 1, "description" : null, "product_info" : [ ], "type" : "standard", "platform" : "Linux", "self_dev_flag" : 1, "approval_result" : "ok", "measure_type" : "physical_src", "update_time" : "2022-06-30 17:30:32 GMT+08:00", "channel_limit" : 10000, "publish_time" : "2022-06-30 17:31:52 GMT+08:00", "resource_step_size" : 1, "approval_time" : "2022-06-30 17:30:32 GMT+08:00", "cloud_service_type" : null, "test_status" : 0, "chip" : "Ascend 310", "is_verify_model" : false, "format" : "file", "resource_type" : null, "version" : "1.0.0", "measure_unit" : "qps", "tags" : [ ], "size" : 1439, "test_result" : null, "versions" : [ "1.0.0" ], "install_times" : 0, "privacy_policy" : [ ], "name" : "create26xDM", "scenes" : [ ], "charge_model" : 2, "resource_spec_code" : null, "skill_id" : 12233223, "developer" : "ssss", "main_scenes" : "园区", "device_types" : [ ], "status" : 1}
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 sub_scenes String 技能应用场景 app_template_id String 应用模板ID icon String 技能图标 version_num Integer 技能版本数量 description String 技能描述 product_info Array of strings 计费编码信息 type String 技能类别,分为standard和lite platform String 技能操作系统平台,其值为:Linux,Android, iOS, LiteOS,Windows self_dev_flag Integer 自研标识,1表示是HiLens自研算法。 measure_type String 计费类型,physical_src表示 src approval_result String 技能审核结果 update_time String 更新时间,形如2022-06-30 17:22:48 GMT+08:00 channel_limit Integer 通道数 publish_time String 发布时间 resource_step_size Integer 步长 approval_time String 审批时间 cloud_service_type String 云服务编码 summary String 摘要 test_status Integer 测试状态 chip String 芯片 is_verify_model Boolean 是否校验模型 format String 技能类型,文件类型file,镜像类型iamge resource_type String 资源类别 version String 技能版本 measure_unit String 计费单位 qps 表示按qps收费,road表示技能路数instance 表示按实例收费 tags Array of strings 标签 size Integer 技能大小 test_result String 测试结果 install_times Integer 安装次数 privacy_policy Array of strings 隐私条款 name String 技能名字 scenes Array of strings 技能场景 charge_model Integer 计费模式 resource_spec_code String 云服务资源编码 skill_id String 技能Id developer String 开发者名字 main_scenes String 主场景 device_types Array of strings 所支持的设备类别 status Integer 技能状态 versions Array of strings 技能版本号列表 状态码: 401 表5 响应Header参数 参数 参数类型 描述 X-request-id String This field is the request ID number for task tracking. Format is request_uuid-timestamp-hostname.
  • 响应示例 状态码: 200 请求成功 { "workspace_id" : "string", "secret" : { "id" : "string", "name" : "string", "description" : "string", "project_id" : "string", "created_at" : "string", "updated_at" : "string", "secrets" : [ { "key" : "string", "value" : "string" } ], "tags" : [ { "key" : "string", "value" : "string" } ] }}
  • 请求示例 创建新的密钥 POST https://{endpoint}/v3/{project_id}/ai-mgr/secrets{ "workspace_id" : "string", "secret" : { "name" : "string", "description" : "string", "secrets" : [ { "key" : "string", "value" : "string" } ], "tags" : [ { "key" : "string", "value" : "string" } ] }}
共99316条