查询应用列表
接口描述
GET /compute/workspace/data/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/workspaces/{workspace_name}/apps
请求头(Request Header)
请求参数(Request Parameters)
| 名称 | 位置 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
|---|---|---|---|---|---|---|
| subscription_name | path | string | true | --- | --- | (资源ID)订阅 |
| resource_group_name | path | string | true | --- | --- | (资源ID)资源组 |
| zone | path | string | true | --- | --- | (资源ID)可用区 |
| workspace_name | path | string | true | --- | --- | (资源ID)工作空间资源名称 |
| state | query | string(enum) | false | --- | --- | 应用状态 |
| owner_id | query | string | false | --- | --- | 拥有者唯一标识 |
| match_display_name | query | string | false | --- | --- | 过滤显示名. 当为空字符串时表示不过滤显示名 |
| page_size | query | integer(int32) | false | --- | --- | 可选,每一页的大小,需为非负整数,如果不填或填0,则忽略page_token,返回所有数据 |
| page_token | query | string | false | --- | --- | 可选,查询第几页,需为正整数字符串,缺省值为"1" |
| filter | query | string | false | --- | --- | 可选,过滤条件. 当前支持按照创建时间进行过滤,如:'begin_date':'2023-02-08T08:13:24.660710Z','end_date':'2023-02-08T08:16:15.498162Z',左闭右开 |
请求体(Request Body)
无
请求示例(Request Example)
curl --request GET \
--url https://example.com/compute/workspace/data/v1/subscriptions/string/resourceGroups/string/zones/string/workspaces/string/apps \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
响应参数(Response Parameters)
| 名称 | 类型 | 描述 |
|---|---|---|
| apps | array | 应用 |
| total_size | int | 符合当前查询条件的后台数据总数(不是当前返回数据总数) |
| 名称 | 类型 | 描述 |
|---|---|---|
| » metadata | Metadata | 对象的元数据 |
| »» uid | string | 唯一标识 |
| »» deleted | boolean | 资源是否已删除 |
| »» create_time | string(date-time) | 资源创建时间 |
| »» update_time | string(date-time) | 资源更新时间 |
| » ownership | Ownership | 所有权关系 |
| »» creator_id | string | 创建者id |
| »» owner_id | string | 拥有者id |
| »» tenant_id | string | 租户id |
| »» creator_name | string | 创建者name |
| » info | AppInfo | true |
| »» subscription_name | string | 订阅 |
| »» resource_group_name | string | (资源ID)资源组 |
| »» zone | string | (资源ID)可用区 |
| »» workspace_name | string | (资源ID)工作空间资源名称 |
| »» workspace_display_name | string | (资源ID)工作空间资源名称 |
| »» aec2_name | string | true |
| »» aec2_id | string | AI弹性计算集群id |
| »» vpc_id | string | 虚拟私有集群 |
| »» name | string | 应用名称. 填写需要遵循规范,如果不填写,则由后台随机生成 |
| »» display_name | string | true |
| »» description | string | 应用描述 |
| » template | InstanceTemplate | true |
| »» init_containers | [Container] | 初始化容器列表 |
| »»» name | string | 容器名称 |
| »»» image_type | string(enum) | true |
| »»» image | string | true |
| »»» image_display_name | string | 镜像名,用于页面展示 |
| »»» command | [string] | 容器命令列表 |
| »»» env | [EnvVar] | 容器环境变量列表 |
| »»»» name | string | true |
| »»»» value | string | true |
| »»»» need_mosaic | boolean | true |
| »»» need_cache | boolean | 启动缓存 |
| »»» container_type | string(enum) | 容器类型 |
| »»» resource_request | object | 容器资源请求. 若资源请求为空时,直接取用resource spec的规格 |
| »»»» additionalProperties | string | none |
| »»» volume_mounts | [VolumeMount] | 卷挂载 |
| »»»» type | string(enum) | 挂载类型 |
| »»»» name | string | 卷名 |
| »»»» mount_path | string | 挂载路径 |
| »»»» afs_id | string | AI文件存储配置 |
| »»»» volume_capacity | string | 卷容量 |
| »» containers | [Container] | 容器列表 |
| »» compute_resource_spec | ComputeResourceSpec | true |
| »»» name | string | true |
| » scaling | Scaling | true |
| »» scaling_strategy | string | true |
| »» replicas | integer(int32) | true |
| »» cpu_load | integer(int32) | cpu负载 |
| »» min_replicas | integer(int32) | 最小副本数 |
| »» max_replicas | integer(int32) | 最大副本数 |
| » networking | Networking | 网络配置 |
| »» access_port | integer(int32) | true |
| »» intranet_ip | string | 内网访问IP |
| »» intranet_domain_name | string | 内网访问域名 |
| » scheduling | Scheduling | true |
| »» priority | string(enum) | true |
| »» cluster_id | string | 被调度集群id |
| »» resource_pool_id | string | 资源池id |
| » ready_replicas | integer(int32) | 应用当前副本中运行中状态的副本数量 |
| » state | string(enum) | 应用状态 |
| » transition_error | string | 失败原因 |
| » need_cache | boolean | 启动缓存, 每个容器内也有对应配置, 会被内部配置覆盖 |
| » app_port | [integer] | true |
| » execution_type | string(enum) | true |
| » aec2 | AEC2 | 应用所属集群 |
| »» id | string | aec2 id |
| »» uid | string | aec2的uuid |
| »» name | string | 资源标识 |
| »» display_name | string | 资源名称 |
| »» state | string | 资源状态 |
| » last_operation_type | string(enum) | service上一次操作 |
| » resource_spec | ResourceSpec | 资源规格属性 |
| »» id | string | 资源规格标识 |
| »» name | string | 资源规格标识 |
| »» description | string | 资源规格描述 |
| »» category | string | 资源规格类型, eg.ACN/JOB/CCI |
| »» sku_id | string | 云管sku_id |
| »» cpu | CPU | CPU |
| »»» manufacturer | string | cpu厂商. 例: Intel/AMD/Hygon |
| »»» type | string | CPU 类型. 例: 2680v4/6146 |
| »»» frequency | number(float) | CPU 主频 |
| »»» vcpu_allocatable | integer(int32) | 可分配vCPU数量 |
| »»» vcpu_capacity | integer(int32) | 物理vCPU总量(暂未使用) |
| »» memory | Memory | 内存 |
| »»» allocatable | number(float) | 可分配内存 |
| »»» capacity | number(float) | 物理内存总量(暂未使用) |
| »» device | Device | 加速芯片 |
| »»» manufacturer | string | 加速芯片厂商. 例:NVIDIA/DCU |
| »»» type | string | 加速芯片类型. 例:A100/A800/Z800 |
| »»» memory | number(float) | 显存 |
| »»» number | integer(int32) | 加速芯片数量 |
| »»» physical_interface | string | 显卡物理形态 |
| »» training_network | TrainingNetwork | 训练网 |
| »»» network | Network | 网络 |
| »»»» type | string | 网络类型. 例:IB/RoCE |
| »»»» nics_number | integer(int32) | 网卡数量 |
| »»»» bandwidth | string | 网络带宽 |
| »»» name | string | 训练网编号 |
| »» service_network | ServiceNetwork | 业务网 |
| »»» network | Network | 网络 |
| »» data_network | DataNetwork | 数据网 |
| »»» network | Network | 网络 |
| »» storage | Storage | 存储 |
| »» custom | string | 自定义字段 |
| 参数 | 取值 |
|---|---|
| » state | UNKNOWN_APP_STATE |
| » state | INIT |
| » state | UPDATING |
| » state | QUEUING |
| » state | SCHEDULED |
| » state | PROGRESSING |
| » state | RUNNING |
| » state | FAILED |
| » state | DELETING |
| » state | DELETED |
| » state | SUSPENDING |
| » state | SUSPENDED |
| » execution_type | UNKNOWN |
| » execution_type | START |
| » execution_type | SUSPEND |
| » last_operation_type | CREATION |
| » last_operation_type | UPDATE |
| » last_operation_type | SUSPENSION |
| » last_operation_type | DELETION |
响应示例(Response Example)
{
"apps": [
{
"metadata": {
"uid": "qdma7pfgkadofjoiqgu44s29fp4hnns96ty0",
"deleted": false,
"create_time": "2023-12-13T08:47:51.136723Z",
"update_time": "2023-12-13T08:47:51.136723Z"
},
"ownership": {
"creator_id": "01bf84bf-92e0-4774-9e36-c31f852d28c8",
"owner_id": "01bf84bf-92e0-4774-9e36-c31f852d28c8",
"tenant_id": "d1f3a37a-995b-409d-8001-97a5f48a88da",
"creator_name": "acptest"
},
"info": {
"subscription_name": "d1f3a37a-995b-409d-8001-97a5f48a88da",
"resource_group_name": "default",
"zone": "cn-sh-01a",
"workspace_name": "e87cb6db-863c-4392-b6c7-31c04e91d462",
"workspace_display_name": "test_jiangxiaowei",
"aec2_name": "e4a32c09-2eda-4b2e-a5ed-f73e11330a20",
"aec2_id": "20ffa01a-2564-11ee-9c2c-c6bcf437a3e9",
"vpc_id": "",
"name": "app-x12or2jz",
"display_name": "msw_test",
"description": ""
},
"template": {
"init_containers": [],
"containers": [
{
"name": "mswtest",
"image_type": "OFFICIAL",
"image": "registry.sensecore.tech/lepton-cci-dev/ubuntu20.04-cuda12.2-tritonserver2.6.0-amd64:20230830-121344",
"image_display_name": "lepton-cci-dev/ubuntu20.04-cuda12.2-tritonserver2.6.0-amd64:20230830-121344",
"command": [],
"env": [],
"need_cache": false,
"container_type": "MAIN",
"resource_request": {
"cpu": "1",
"memory": "8GiB",
"nvidia.com/gpu": "1"
},
"volume_mounts": []
}
],
"compute_resource_spec": {
"name": "N2lS.Ie.I60.1"
}
},
"scaling": {
"scaling_strategy": "",
"replicas": 1,
"cpu_load": 0,
"min_replicas": 0,
"max_replicas": 0
},
"networking": {
"access_port": 0,
"intranet_ip": "",
"intranet_domain_name": "app-x12or2jz.ns-acptest-22ecc49f.svc.cluster.local"
},
"scheduling": {
"priority": "HIGH",
"cluster_id": "",
"resource_pool_id": ""
},
"ready_replicas": 0,
"state": "QUEUING",
"transition_error": "",
"need_cache": false,
"app_port": [
200
],
"execution_type": "START",
"aec2": {
"id": "/subscriptions/d1f3a37a-995b-409d-8001-97a5f48a88da/resourceGroups/default/zones/cn-sh-01a/aec2s/e4a32c09-2eda-4b2e-a5ed-f73e11330a20",
"uid": "20ffa01a-2564-11ee-9c2c-c6bcf437a3e9",
"name": "e4a32c09-2eda-4b2e-a5ed-f73e11330a20",
"display_name": "test_jiangxiaowei",
"state": "ACTIVE",
"type": "private"
},
"last_operation_type": "CREATION",
"resource_spec": {
"id": "N2lS.Ie.I60.1",
"name": "N2lS.Ie.I60.1",
"description": "1XA100-80GB",
"category": "JOB",
"sku_id": "N2lS.Ie.I60",
"cpu": {
"manufacturer": "Intel",
"type": "6348",
"frequency": 2.6,
"vcpu_allocatable": 12,
"vcpu_capacity": 0
},
"memory": {
"allocatable": 120,
"capacity": 0
},
"device": {
"manufacturer": "NVIDIA",
"type": "A100",
"memory": 80,
"number": 1,
"physical_interface": "SXM4"
},
"training_network": {
"network": {
"type": "IB",
"nics_number": 2,
"bandwidth": "200G"
},
"name": ""
},
"service_network": {
"network": {
"type": "",
"nics_number": 0,
"bandwidth": ""
}
},
"data_network": {
"network": {
"type": "",
"nics_number": 0,
"bandwidth": ""
}
},
"storage": null,
"custom": ""
}
}
],
"next_page_token": "",
"total_size": 1
}