华为云用户手册

  • URI GET /v2/{project_id}/training-jobs/{training_job_id}/tasks/{task_id}/logs/preview 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 training_job_id 是 String 训练作业ID。 task_id 是 String 训练作业的任务名称。可从训练作业详情中的status.tasks字段中获取。 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 training_job_id 是 String 训练作业ID。 task_id 是 String 训练作业的任务名称。可从训练作业详情中的status.tasks字段中获取。
  • 响应示例 状态码: 200 ok { "content" : "[Modelarts Service Log]collect and upload ascend logs end at 2021-05-18-14:28:13\n[Modelarts Service Log]exiting..: \n [Modelarts Service Log]exiting...\n[Modelarts Service Log]exiting..: \n [Modelarts Service Log]exiting...\n[Modelarts Service Log]exit with : \n [Modelarts Service Log]exit with 0\n[Modelarts Service Log]exit with : \n [Modelarts Service Log]exit with 0\n[ModelArts Service Log][INFO][2021/05/18 14:28:14,207]:\n output-handler finalizing due to: [training finished]\n[ModelArts Service Log][INFO][2021/05/18 14:28:14,207]:\n output-handler finalized\n[Modelarts Service Log][sidecar] exiting at 2021-05-18-14:28:14\n[Modelarts Service Log][sidecar] wait python processes exit..: \n [Modelarts Service Log][sidecar] wait python processes exit...\n[Modelarts Service Log][sidecar] exit with :\n [Modelarts Service Log][sidecar] exit with 0", "current_size" : 126548, "full_size" : 5242880 }
  • 响应参数 状态码: 200 表2 响应Body参数 参数 参数类型 描述 content String 日志内容。如果日志大小没有超过上限(n兆)则返回全部内容,如果日志超过了上限(n兆)则返回最新的n兆的日志。2022/03/01 00:00:00 (GMT+08:00)后,此参数名称由“context”改为“content”。 current_size Integer 当前返回的日志大小(单位:字节)。最大为5兆。 full_size Integer 完整的日志大小(单位:字节)。
  • URI GET /v2/{project_id}/datasets/{dataset_id}/tasks 表1 路径参数 参数 是否必选 参数类型 描述 dataset_id 是 String 数据集ID。 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 指定每一页返回的最大条目数,取值范围[1,100],默认为10。 offset 否 Integer 分页列表的起始页,默认为0。 task_name 否 String 根据任务名称过滤。 type 否 String 任务类型,不传则默认返回智能标注(主动学习或预标注)任务列表。可选值如下: auto-label:主动学习 pre-label:预标注 auto-grouping:自动分组
  • 响应示例 状态码: 200 OK { "tasks" : [ { "dataset_id" : "OBegCXHxTJ2JHRAZWr0", "task_id" : "14cyxyu6UXaNT3lrPFl", "type" : 1, "create_time" : "2020-11-03 15:22:39", "status" : 3, "code" : "ModelArts.4996", "message" : "prelabel task execute successfully.", "elapsed_time" : 531, "result" : { "service_id" : "ee2ade80-0967-4ef3-b6da-e8c873017b9a", "service_name" : "prelabel_infer_1604388201993_xubo_cls_snt9_2_993", "hard_select_tasks" : [ { "hard_select_task_id" : "86711ab3-8ceb-4b0e-bd52-8545b184a2a7", "dataset_id" : "OBegCXHxTJ2JHRAZWr0", "dataset_name" : "xubo_cls_snt9_2", "task_status" : "import_dataset_completed", "time" : 262, "create_at" : 0, "update_at" : 0 } ] }, "progress" : 100.0, "total_sample_count" : 246, "annotated_sample_count" : 38, "unconfirmed_sample_count" : 208, "model_id" : "c717a39f-c64f-45df-a9d3-be9ed79cdcb4", "model_name" : "auto-deploy-50041602581620628", "model_version" : "0.0.1", "config" : { "ambiguity" : false, "name" : "5fXxR01TyUoiobqNEd9", "worker_server_num" : 0, "inf_config_list" : [ { "specification" : "modelarts.vm.cpu.2u", "weight" : 0, "instance_count" : 1 } ], "collect_sample" : false, "confidence_scope" : "0.0-0.5", "algorithm_type" : "supervisory", "image_brightness" : false, "image_colorfulness" : false } }, { "dataset_id" : "OBegCXHxTJ2JHRAZWr0", "task_id" : "5QPy73VwnwHi5NqvbcP", "type" : 0, "create_time" : "2020-10-31 16:11:37", "status" : 3, "code" : "ModelArts.4996", "message" : "task executed successfully.", "elapsed_time" : 397, "result" : { "train_job_name" : "BNFURaEyftGNMITaBiv", "train_job_id" : "74679", "version_id" : "89745" }, "progress" : 100.0, "total_sample_count" : 246, "annotated_sample_count" : 38, "unconfirmed_sample_count" : 198, "model_name" : "Supervisory", "model_version" : "0.0.1", "config" : { "ambiguity" : false, "worker_server_num" : 0, "collect_sample" : false, "algorithm_type" : "fast", "image_brightness" : false, "image_colorfulness" : false } } ], "total_count" : 2, "exist_running_deploy_task" : false }
  • 功能介绍 分页查询智能任务列表,包括“智能标注”和“自动分组”两大类智能任务。可通过指定“type”参数来单独查询某类任务的列表。 “智能标注”是指基于当前标注阶段的标签及图片学习训练,选中系统中已有的模型进行智能标注,快速完成剩余图片的标注操作。“智能标注”又包含“主动学习”和“预标注”两类。 “主动学习”表示系统将自动使用半监督学习、难例筛选等多种手段进行智能标注,降低人工标注量,帮助用户找到难例。 “预标注”表示选择用户模型管理里面的模型进行智能标注。 “自动分组”是指先使用聚类算法对未标注图片进行聚类,再根据聚类结果进行处理,可以分组打标或者清洗图片。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 import_tasks Array of ImportTaskStatusResp objects 导入任务列表。 total_count Integer 导入任务的数量。 表4 ImportTaskStatusResp 参数 参数类型 描述 annotated_sample_count Long 已标注样本数量。 create_time Long 任务创建时间。 data_source DataSource object 数据来源。 dataset_id String 数据集ID。 elapsed_time Long 任务运行时间,单位秒。 error_code String 错误码。 error_msg String 错误信息。 file_statistics FileCopyProgress object 文件复制进度。 finished_file_count Long 传输完成文件数。 finished_file_size Long 传输完成文件大小(字节)。 import_path String 导入的OBS路径或manifest路径。 导入manifest时,path必须精确到具体manifest文件。 导入为目录时,目前仅支持数据集类型为图片分类、物体检测、文本分类、声音分类。 import_type Integer 导入方式。可选值如下: 0:目录导入 1:按manifest文件导入 imported_sample_count Long 已导入的样本数量。 imported_sub_sample_count Long 已导入的子样本数量。 processor_task_id String 预处理任务ID。 processor_task_status Integer 预处理任务状态。 status String 导入任务的当前状态。可选值如下: QUEUING:排队中 STARTING:开始执行 RUNNING:运行中 COMPLETED:已完成 FAILED:已失败 NOT_EXIST:不存在 task_id String 任务ID。 total_file_count Long 总文件数。 total_file_size Long 总文件大小(字节)。 total_sample_count Long 样本总数量。 total_sub_sample_count Long 从父样本生成的子样本总数。 unconfirmed_sample_count Long 待确认样本数量。 update_ms Long 任务更新时间。 表5 DataSource 参数 参数类型 描述 data_path String 数据源所在路径。 data_type Integer 数据类型。可选值如下: 0:OBS桶(默认值) 1:GaussDB(DWS)服务 2:DLI服务 3:RDS服务 4:MRS服务 5:AI Gallery 6:推理服务 schema_maps Array of SchemaMap objects 表格数据对应的schema映射信息。 source_info SourceInfo object 导入表格数据源所需的信息。 with_column_header Boolean 文件中首行是否是列名,用于表格数据集。可选值如下: true:文件首行为列名 false:文件首行不为列名 表6 SchemaMap 参数 参数类型 描述 dest_name String 目的方的列名。 src_name String 来源方的列名。 表7 SourceInfo 参数 参数类型 描述 cluster_id String MRS集群ID。可登录MRS控制台查看。 cluster_mode String MRS集群运行模式。可选值如下: 0:普通集群 1:安全集群 cluster_name String MRS集群名称。可登录MRS控制台查看。 database_name String 导入表格数据集,数据库名字。 input String 表格数据集,HDFS路径。例如/datasets/demo。 ip String 用户GaussDB(DWS)集群的IP地址。 port String 用户GaussDB(DWS)集群的端口。 queue_name String 表格数据集,DLI队列名。 subnet_id String MRS集群的子网ID。 table_name String 导入表格数据集,表名。 user_name String 用户名,GaussDB(DWS)数据需提供此参数。 user_password String 用户密码,GaussDB(DWS)数据需提供此参数。 vpc_id String MRS集群所在的vpc的ID。 表8 FileCopyProgress 参数 参数类型 描述 file_num_finished Long 传输完成文件数。 file_num_total Long 总文件数。 file_size_finished Long 传输完成文件大小(字节)。 file_size_total Long 总文件大小(字节)。
  • 响应示例 状态码: 200 OK { "total_count" : 1, "import_tasks" : [ { "status" : "COMPLETED", "task_id" : "gfghHSokody6AJigS5A_RHJ1zOkIoI3Nzwxj8nh", "dataset_id" : "gfghHSokody6AJigS5A", "import_path" : "obs://test-obs/daoLu_images/animals/", "import_type" : 0, "total_sample_count" : 20, "imported_sample_count" : 20, "annotated_sample_count" : 20, "total_sub_sample_count" : 0, "imported_sub_sample_count" : 0, "total_file_size" : 0, "finished_file_count" : 0, "finished_file_size" : 0, "total_file_count" : 0, "create_time" : 1606114833874, "elapsed_time" : 2 } ] }
  • URI GET /v2/{project_id}/datasets/{dataset_id}/import-tasks 表1 路径参数 参数 是否必选 参数类型 描述 dataset_id 是 String 数据集ID。 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 指定每一页返回的最大条目数,取值范围[1,100],默认为10。 offset 否 Integer 分页列表的起始页,默认为0。
  • 响应示例 状态码: 200 OK { "app" : { "app_id" : "f29eddd1443e4dceb76898f881c07a4d", "app_name" : "app_xq0XT", "app_remark" : "autotest", "app_key" : "bcb835430eab4c72bd45e2315d98fdb9", "app_secret" : "80dc4ab97b34456fbf73a04e83164a1b", "user_id" : "04f258c8fb00d42a1f65c00df88cc4dc", "project_id" : "04f258c84780d5a52f3bc00dc15aa5e7", "app_type" : "APIG", "app_codes" : [ ], "created_at" : 1698745606957, "updated_at" : 1703162934072, "bounded_api_count" : 0 } }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 app ApigAppDetailInfo object 创建的APP基础信息。 表5 ApigAppDetailInfo 参数 参数类型 描述 app_codes Array of strings APP Code列表,当APP类型为APIC时,此参数为空。 app_id String APP编号。 app_key String APP的key。 app_name String APP名称。 app_remark String APP描述,默认为空。不超过200个字符。 app_secret String APP密钥。 app_type String APP类型。枚举值如下: APIC:该APP注册在roma connect网关上 APIG:该APP注册在共享API网关上 DEDICATE_APIG:该APP注册在专享API网关上 bounded_api_count Integer APP绑定API数量。 created_at Long APP创建时间。 project_id String 项目ID。 updated_at Long APP更新时间。 user_id String APP创建用户ID。 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码。 error_msg String 具体错误信息。 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码。 error_msg String 具体错误信息。
  • URI DELETE /v1/{project_id}/app-auth/apps/{app_id}/app-code/{app_code} 表1 路径参数 参数 是否必选 参数类型 描述 app_code 是 String 待删除的AppCode。 app_id 是 String APP编号,可通过APP列表接口获取。 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 表2 Query参数 参数 是否必选 参数类型 描述 workspace_id 否 String 工作空间id。
  • 响应示例 状态码: 200 OK { "app" : { "app_id" : "logic-app-7ded3898-8306-49ee-a1df-2708f9aac83a", "app_name" : "app_c8ae", "app_key" : "9cdbfd0b65364fbe8b1c6cf29255a46f", "app_secret" : "c736b99bdc33403ab0652bf91c00e99e", "user_id" : "04f258c8fb00d42a1f65c00df88cc4dc", "project_id" : "04f258c84780d5a52f3bc00dc15aa5e7", "app_type" : "DEDICATE_APIG", "app_codes" : [ ], "created_at" : 1703162733450, "updated_at" : 1703162733450, "bounded_api_count" : 0 } }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 Content-Type 否 String 消息体的类型。设置为text/plain,返回临时预览链接。设置为application/octet-stream,返回临时下载链接。 X-Auth-Token 是 String 用户token 表3 请求Body参数 参数 是否必选 参数类型 描述 app_name 是 String app名称。 app_remark 否 String app备注。 workspace_id 否 String 工作空间id。
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 app ApigAppDetailInfo object 创建的APP基础信息。 表5 ApigAppDetailInfo 参数 参数类型 描述 app_codes Array of strings APP Code列表,当APP类型为APIC时,此参数为空。 app_id String APP编号。 app_key String APP的key。 app_name String APP名称。 app_remark String APP描述,默认为空。不超过200个字符。 app_secret String APP密钥。 app_type String APP类型。枚举值如下: APIC:该APP注册在roma connect网关上 APIG:该APP注册在共享API网关上 DEDICATE_APIG:该APP注册在专享API网关上 bounded_api_count Integer APP绑定API数量。 created_at Long APP创建时间。 project_id String 项目ID。 updated_at Long APP更新时间。 user_id String APP创建用户ID。 状态码: 401 表6 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码。 error_msg String 具体错误信息。 状态码: 403 表7 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码。 error_msg String 具体错误信息。 状态码: 404 表8 响应Body参数 参数 参数类型 描述 error_code String ModelArts错误码。 error_msg String 具体错误信息。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 count Integer 结果总数。 has_more Boolean 是否已返回全部结果。 results Array of DescProcessorTaskVersionResultsResp objects 分页展示的结果。 表4 DescProcessorTaskVersionResultsResp 参数 参数类型 描述 new_source String 处理后样本的地址。 origin_source String 样本的原地址。 result_description Array of objects 样本的处理描述。 result_property Integer 样本的处理状态。可选值如下: -1:全部 0:保留 1:修改 2:删除 3:新增 sample_id String 样本ID,通过OBS路径的md5生成。 signed_new_source String 签名后的处理后样本地址。 signed_origin_source String 签名后的原样本地址。 version_id String 数据处理任务的版本ID。
  • 响应示例 状态码: 200 OK { "count" : 3, "results" : [ { "sample_id" : "0ac9aee517acbef965f547bb5a3268af", "version_id" : "7PoIhUzSk92OglQrTxr", "origin_source" : "s3://test-obs/classify/data/animals/8.jpg", "new_source" : "obs://test-obs/classify/output/7PoIhUzSk92OglQrTxr/Data/8.jpg", "signed_origin_source" : "https://test-obs.obs.xxx.com:443/classify/data/animals/8.jpg?AccessKeyId=I5IZ9R29S1W9WACNJJ0J&Expires=1606380154&x-obs-security-token=gQpjbi1ub3J0aC03jQ5yFSR1TfKXjeawutgyAnMranimalsNaSkeSBOKK...&Signature=GbnVBZ5JxUWhiAulUzpV9TD835Q%3D", "signed_new_source" : "https://test-obs.obs.xxx.com:443/classify/output/7PoIhUzSk92OglQrTxr/Data/8.jpg?AccessKeyId=I5IZ9R29S1W9WACNJJ0J&Expires=1606380154&x-obs-security-token=gQpjbi1ub3J0aC03jQ5yFSR1TfKXjeawutgyAnMranimalsNaSkeSBOKK...&Signature=Q5stFFFfVx9kykR49S8PPBlFqe0%3D", "result_property" : 3, "result_description" : [ [ "use AddNoise augmentation" ], [ "result_description to translate" ] ] }, { "sample_id" : "196799b2d731727b1800b70851fc60b0", "version_id" : "7PoIhUzSk92OglQrTxr", "origin_source" : "s3://test-obs/classify/data/animals/2.jpg", "new_source" : "obs://test-obs/classify/output/7PoIhUzSk92OglQrTxr/Data/2.jpg", "signed_origin_source" : "https://test-obs.obs.xxx.com:443/classify/data/animals/2.jpg?AccessKeyId=QEKFB6WFGZWC2YUP2JPK&Expires=1606380154&x-obs-security-token=gQpjbi1ub3J0aC03jdUZcXVRCNOHjWNNWiuu2E9Q...&Signature=6yvhJufi5kQO6UjToQgR0ztP%2Bis%3D", "signed_new_source" : "https://test-obs.obs.xxx.com:443/classify/output/7PoIhUzSk92OglQrTxr/Data/2.jpg?AccessKeyId=QEKFB6WFGZWC2YUP2JPK&Expires=1606380154&x-obs-security-token=gQpjbi1ub3J0aC03jdUZcXVRCNOHjWNNWiuu2E...&Signature=Zr%2BAEBDJwKS%2FpS6vzxK7MSzjblA%3D", "result_property" : 3, "result_description" : [ [ "use AddNoise augmentation" ], [ "result_description to translate" ] ] }, { "sample_id" : "1dc7351b78dcb24850f71d20267edd0e", "version_id" : "7PoIhUzSk92OglQrTxr", "origin_source" : "s3://test-obs/classify/data/animals/import_1603716822103/test-obs/classify/output/E8ZLnTQvPBVtbZ6QsAp/Data/13.jpg", "new_source" : "obs://test-obs/classify/output/7PoIhUzSk92OglQrTxr/Data/13.jpg", "signed_origin_source" : "https://test-obs.obs.xxx.com:443/classify/data/animals/import_1603716822103/test-obs/classify/output/E8ZLnTQvPBVtbZ6QsAp/Data/13.jpg?AccessKeyId=W6TSX9F1BRS8AUBDYKPY&Expires=1606380154&x-obs-security-token=gQpjbi1ub3J0aC03jVVFic8iObvdqZLuWxyIHlAjbJPCTX...&Signature=WV73XnoMkBDoSuVe%2BFSUaP1GxKw%3D", "signed_new_source" : "https://test-obs.obs.xxx.com:443/classify/output/7PoIhUzSk92OglQrTxr/Data/13.jpg?AccessKeyId=W6TSX9F1BRS8AUBDYKPY&Expires=1606380154&x-obs-security-token=gQpjbi1ub3J0aC03jVVFic8iObvdqZLuWxyIHlAjbJPCTXeYXkQh8z...&Signature=%2FYsgrsbyrz5ZQrndrQ9QyoHluYQ%3D", "result_property" : 3, "result_description" : [ [ "use AddNoise augmentation" ], [ "result_description to translate" ] ] } ], "has_more" : true }
  • URI GET /v2/{project_id}/processor-tasks/{task_id}/versions/{version_id}/results 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 task_id 是 String 数据处理任务ID。 version_id 是 String 数据处理任务的版本ID。 表2 Query参数 参数 是否必选 参数类型 描述 limit 否 Integer 指定每一页返回的最大条目数,取值范围[1,100],默认为10。 offset 否 Integer 分页列表的起始页,默认为0。 process_parameter 否 String 图像缩略设置,同OBS缩略图设置,详见OBS缩略图设置。如:image/resize,m_lfit,h_200表示等比缩放目标缩略图并设置高度为200像素。 result_property 否 String 样本状态,不传或传-1默认返回全部样本。可选值如下: -1:全部 0:保留 1:修改 2:删除 3:新增
  • URI GET /v2/{project_id}/processor-tasks/items 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 表2 Query参数 参数 是否必选 参数类型 描述 offset 否 Integer 分页列表的起始页,默认为0。 limit 否 Integer 指定每一页返回的最大条目数,取值范围[1,1000],默认为1000。
  • 响应参数 状态码: 200 表3 响应Body参数 参数 参数类型 描述 items Array of ProcessorTaskItem objects 算法类别的列表。 total Integer 总数。 表4 ProcessorTaskItem 参数 参数类型 描述 label_en String 算法类别的英文名称。 label_zh String 算法类别名称。 template_id String 算法类别的ID。
  • 响应示例 状态码: 200 OK { "total" : 4, "items" : [ { "template_id" : "sys_data_cleaning", "label_zh" : "label_zh to translate", "label_en" : "data cleaning" }, { "template_id" : "sys_data_validation", "label_zh" : "label_zh to translate", "label_en" : "data validation" }, { "template_id" : "sys_data_selection", "label_zh" : "label_zh to translate", "label_en" : "data selection" }, { "template_id" : "sys_data_augmentation", "label_zh" : "label_zh to translate", "label_en" : "data augmentation" } ] }
  • 响应参数 状态码: 200 表4 响应Body参数 参数 参数类型 描述 service_name String 服务名称。 service_id String 服务ID。 monitors Array of Monitor objects 监控信息详情。 service_running_instance_count Integer 服务运行中实例数量。 service_instance_count Integer 服务实例数量。 req_count_per_min Long 服务分钟调用量,这里指当前时间上一分钟的服务调用总量。 表5 Monitor 参数 参数类型 描述 failed_times Integer 模型实例调用失败次数,在线服务字段。 model_version String 模型版本,在线服务字段。 cpu_memory_total Integer 总内存,单位MB。 gpu_usage Float 已使用GPU个数。 node_name String 节点名称,边缘服务字段。 gpu_total Float 总GPU个数。 model_id String 模型ID,在线服务字段。 invocation_times Integer 模型实例的总调用次数,在线服务字段。 cpu_core_usage Float 已使用CPU核数。 cpu_core_total Float 总CPU核数。 model_name String 模型名称,在线服务字段。 cpu_memory_usage Integer 已使用内存,单位MB。 node_id String 边缘节点ID,边缘服务字段。 model_running_instance_count Integer 模型运行中实例数。 model_instance_count Integer 模型实例数。 gpu_memory_total Float gpu总显存,单位MB。 gpu_memory_usage Float 已使用gpu显存,单位MB。 npu_total Float 总NPU个数。 npu_usage Float 已使用NPU个数。 npu_memory_total Float npu总显存,单位MB。 npu_memory_usage Float 已使用npu显存,单位MB。
  • 响应示例 状态码: 200 监控信息 { "service_name" : "mnist", "service_id" : "195c1f2d-136d-40af-a0f3-db5717d2634a", "monitors" : [ { "failed_times" : 1, "model_version" : "1.0.0", "cpu_core_total" : 4, "cpu_memory_total" : 8192, "model_name" : "minst", "gpu_usage" : 0.6, "cpu_memory_usage" : 2011, "gpu_total" : 1, "model_id" : "0e07b41b-173e-42db-8c16-8e1b44cc0d44", "invocation_times" : 50, "cpu_core_usage" : 2.4 } ] }
  • URI GET /v1/{project_id}/services/{service_id}/monitor 表1 路径参数 参数 是否必选 参数类型 描述 project_id 是 String 用户项目ID。获取方法请参见获取项目ID和名称。 service_id 是 String 服务ID。 表2 Query参数 参数 是否必选 参数类型 描述 node_id 否 String 待查询的边缘节点ID,仅当infer_type为edge时可指定,默认查询所有节点。
  • 响应示例 状态码: 200 OK { "description" : "api-test", "feature" : "NOTEBOOK", "flavor" : "modelarts.vm.cpu.2u", "id" : "f9937afa-4451-42db-a76b-72d624749f66", "image" : { "description" : "description", "id" : "e1a07296-22a8-4f05-8bc8-e936c8e54090", "name" : "notebook2.0-mul-kernel-cpu-cp36", "swr_path" : "swr.xxxxx.com/atelier/notebook2.0-mul-kernel-cpu-cp36:3.3.2-release_v1", "tag" : "3.3.2-release_v1", "type" : "BUILD_IN" }, "lease" : { "create_at" : 1638841744515, "duration" : 5313106, "enable" : true, "update_at" : 1638843457621 }, "name" : "notebooks_test", "status" : "STOPPING", "token" : "7bddd8ff-8a0d-e063-3107-c70a862832de", "url" : "https://authoring-modelarts-xxxxx.xxxxx.com/f9937afa-4451-42db-a76b-72d624749f66/lab", "volume" : { "category" : "EFS", "ownership" : "MANAGED", "mount_path" : "/home/ma-user/work/", "capacity" : 50 }, "workspace_id" : "0" }
  • 响应参数 状态码: 200 表5 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪ID。 表6 响应Body参数 参数 参数类型 描述 update_time String 本次更新时间,仅触发服务配置升级时会返回,比如修改config参数,可根据此时间从服务更新记录中过滤出此次的更新结果;修改描述或启停服务不会返回此参数。 resource_ids String 更新的资源ID。 状态码: 401 表7 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪ID。 表8 响应Body参数 参数 参数类型 描述 error_code String 服务内部错误码。 error_msg String 错误信息。
  • 请求示例 更新模型服务单个属性。 PUT https://{endpoint}/v1/{project_id}/services/{service_id}/property { "changed_property" : "instance_count", "configs" : [ { "model_id" : "98240f41-6c69-437c-b894-9c488b1d9c43", "changed_value" : 2 } ] }
  • 请求参数 表2 请求Header参数 参数 是否必选 参数类型 描述 X-Auth-Token 是 String 用户token。 表3 请求Body参数 参数 是否必选 参数类型 描述 changed_property 是 String 属性名称,目前只支持instance_count(更新模型服务实例数量)。 configs 否 Array of UpdateServiceConfig objects 服务配置。 表4 UpdateServiceConfig 参数 是否必选 参数类型 描述 changed_value 是 String 属性值,只支持整数,changed_property属性值为"instance_count"时,该值必须大于或小于当前实例数。 model_id 是 String 模型ID。
  • 响应示例 状态码: 200 获取推理VPC访问通道信息。 { "dns_domain_name" : "xxx.xxx.com", "vpcep_info" : [ { "vpcep_service_id" : "2275xxxx-c96f-4xxx-820c-c7xxxxxa7899", "vpcep_service_name" : "cn-nxxxx-x.vpcepname.2275xxxx-c96f-4xxx-820c-c7xxxxxa7899", "service_port" : 443 } ] } 状态码: 401 鉴权失败 { "error_code" : "ModelArts.0203", "error_msg" : "Invalid token." }
  • 响应参数 状态码: 200 表3 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪ID。 表4 响应Body参数 参数 参数类型 描述 dns_domain_name String 页面调用指南展示的访问域名,可用于添加内网DNS解析。 vpcep_info Array of InternalChannelDetail objects 检索到的VPC访问通道信息。 表5 InternalChannelDetail 参数 参数类型 描述 vpcep_service_id String VPC访问通道vpcep终端节点服务ID。 vpcep_service_name String VPC访问通道vpcep终端节点服务名称。 service_port Integer VPC访问通道的端口。 状态码: 401 表6 响应Header参数 参数 参数类型 描述 X-Request-Id String 链路追踪ID 表7 响应Body参数 参数 参数类型 描述 error_code String 服务内部错误码。 error_msg String 错误信息。
共100000条