API请求
URLs
GET zstack/v1/ai/model-services/instances/groups/GET zstack/v1/ai/model-services/instances/groups/{uuid}Headers
Authorization: OAuth the-session-uuidCurl示例
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/ai/model-services/instances/groups/curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/ai/model-services/instances/groups/6bfc05fbbfb839c4959b09901d25bad9可查询字段
运行zstack-cli命令行工具,输入QueryModelServiceInstanceGroup并按Tab键查看所有可查询字段以及可跨表查询的资源名。
API返回
返回示例
{
"inventories": [
{
"modelServiceUuid": "732f371cb8194439b2a08054a9bc061a",
"instances": [
{
"uuid": "949c9938215c474e8725fea42e05943d",
"modelServiceGroupUuid": "3434bd0a20a1441bbfb61cab1c3f6960",
"yaml": "service: service",
"status": "Deploying",
"url": "http://127.0.0.1:3000",
"vmInstanceUuid": "acb334387fe64feaa24939f29a27dc0f",
"accountUuid": "f4714dc111d641d8b5b011d603bd0917",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
],
"status": "Deploying",
"name": "example",
"description": "example description",
"createDate": "Nov 14, 2017 10:20:57 PM",
"lastOpDate": "Nov 14, 2017 10:20:57 PM"
}
]
}| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| success | boolean | 5.2.1 | |
| inventories | List | 详情参考inventories | 5.2.1 |
| error | ErrorCode | 错误码,若不为null,则表示操作失败, 操作成功时该字段为null。 详情参考error | 5.2.1 |
#error
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| code | String | 错误码号,错误的全局唯一标识,例如SYS.1000, HOST.1001 | 5.2.1 |
| description | String | 错误的概要描述 | 5.2.1 |
| details | String | 错误的详细信息 | 5.2.1 |
| elaboration | String | 保留字段,默认为null | 5.2.1 |
| opaque | LinkedHashMap | 保留字段,默认为null | 5.2.1 |
| cause | ErrorCode | 根错误,引发当前错误的源错误,若无原错误,该字段为null | 5.2.1 |
#inventories
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 5.2.1 |
| modelServiceUuid | String | 5.2.1 | |
| modelUuid | String | 5.2.1 | |
| status | String | 5.2.1 | |
| modelServiceType | String | 5.2.1 | |
| type | String | 5.2.1 | |
| name | String | 资源名称 | 5.2.1 |
| description | String | 资源的详细描述 | 5.3.20 |
| createDate | Timestamp | 创建时间 | 5.2.1 |
| lastOpDate | Timestamp | 最后一次修改时间 | 5.2.1 |
| instances | List | 详情参考instances | 5.2.1 |
| datasetRefInventories | List | 详情参考datasetRefInventories | 5.2.1 |
#instances
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 5.2.1 |
| modelServiceGroupUuid | String | 5.2.1 | |
| yaml | String | 5.2.1 | |
| k8sResourceYaml | String | 5.2.1 | |
| status | String | 5.2.1 | |
| url | String | 5.2.1 | |
| urlMaps | Map | 5.2.1 | |
| internalUrl | String | 5.2.1 | |
| jupyterUrl | String | 5.2.1 | |
| vmInstanceUuid | String | 云主机UUID | 5.2.1 |
| createDate | Timestamp | 创建时间 | 5.2.1 |
| lastOpDate | Timestamp | 最后一次修改时间 | 5.2.1 |
| vm | VmInstanceInventory | 详情参考vm | 5.2.1 |
#vm
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 0.6 |
| name | String | 资源名称 | 0.6 |
| description | String | 资源的详细描述 | 0.6 |
| zoneUuid | String | 区域UUID | 0.6 |
| clusterUuid | String | 集群UUID | 0.6 |
| imageUuid | String | 镜像UUID | 0.6 |
| hostUuid | String | 物理机UUID | 0.6 |
| lastHostUuid | String | 0.6 | |
| instanceOfferingUuid | String | 计算规格UUID | 0.6 |
| rootVolumeUuid | String | 根云盘UUID | 0.6 |
| platform | String | 0.6 | |
| architecture | String | 0.6 | |
| defaultL3NetworkUuid | String | 0.6 | |
| type | String | 0.6 | |
| hypervisorType | String | 0.6 | |
| memorySize | Long | 0.6 | |
| cpuNum | Integer | 0.6 | |
| cpuSpeed | Long | 0.6 | |
| allocatorStrategy | String | 0.6 | |
| createDate | Timestamp | 创建时间 | 0.6 |
| lastOpDate | Timestamp | 最后一次修改时间 | 0.6 |
| state | String | 0.6 | |
| guestOsType | String | 4.1.2 | |
| vmNics | List | 详情参考vmNics | 0.6 |
| allVolumes | List | 详情参考allVolumes | 0.6 |
| vmCdRoms | List | 详情参考vmCdRoms | 0.6 |
#vmNics
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 4.7.13 |
| vmInstanceUuid | String | 云主机UUID | 4.7.13 |
| l3NetworkUuid | String | 三层网络UUID | 4.7.13 |
| ip | String | 4.7.13 | |
| mac | String | 4.7.13 | |
| hypervisorType | String | 4.7.13 | |
| netmask | String | 4.7.13 | |
| gateway | String | 4.7.13 | |
| metaData | String | 4.7.13 | |
| ipVersion | Integer | 4.7.13 | |
| driverType | String | 4.7.13 | |
| internalName | String | 4.7.13 | |
| deviceId | Integer | 4.7.13 | |
| type | String | 4.7.13 | |
| state | String | 网卡状态 | 4.7.13 |
| createDate | Timestamp | 创建时间 | 4.7.13 |
| lastOpDate | Timestamp | 最后一次修改时间 | 4.7.13 |
| usedIps | List | 详情参考usedIps | 4.7.13 |
#usedIps
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 5.0.0 |
| ipRangeUuid | String | IP段UUID | 5.0.0 |
| l3NetworkUuid | String | 三层网络UUID | 5.0.0 |
| ipVersion | Integer | 5.0.0 | |
| ip | String | 5.0.0 | |
| netmask | String | 5.0.0 | |
| gateway | String | 5.0.0 | |
| usedFor | String | 分配原因 | 5.0.0 |
| ipInLong | long | 5.0.0 | |
| ipInBinary | byte[] | 5.2.0 | |
| vmNicUuid | String | 云主机网卡UUID | 5.0.0 |
| createDate | Timestamp | 创建时间 | 5.0.0 |
| lastOpDate | Timestamp | 最后一次修改时间 | 5.0.0 |
#allVolumes
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 4.7.13 |
| name | String | 资源名称 | 4.7.13 |
| description | String | 资源的详细描述 | 4.7.13 |
| primaryStorageUuid | String | 主存储UUID | 4.7.13 |
| vmInstanceUuid | String | 云主机UUID | 4.7.13 |
| diskOfferingUuid | String | 云盘规格UUID | 4.7.13 |
| rootImageUuid | String | 4.7.13 | |
| installPath | String | 4.7.13 | |
| type | String | 4.7.13 | |
| format | String | 4.7.13 | |
| size | Long | 4.7.13 | |
| actualSize | Long | 4.7.13 | |
| deviceId | Integer | 4.7.13 | |
| state | String | 4.7.13 | |
| status | String | 4.7.13 | |
| createDate | Timestamp | 创建时间 | 4.7.13 |
| lastOpDate | Timestamp | 最后一次修改时间 | 4.7.13 |
| isShareable | Boolean | 4.7.13 | |
| volumeQos | String | 4.7.13 | |
| lastDetachDate | Timestamp | 4.7.13 | |
| lastVmInstanceUuid | String | 4.7.13 |
#vmCdRoms
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 4.7.13 |
| vmInstanceUuid | String | 云主机UUID | 4.7.13 |
| deviceId | Integer | 4.7.13 | |
| isoUuid | String | 4.7.13 | |
| isoInstallPath | String | 4.7.13 | |
| name | String | 资源名称 | 4.7.13 |
| description | String | 资源的详细描述 | 4.7.13 |
| createDate | Timestamp | 创建时间 | 4.7.13 |
| lastOpDate | Timestamp | 最后一次修改时间 | 4.7.13 |
#datasetRefInventories
| 名字 | 类型 | 描述 | 起始版本 |
|---|---|---|---|
| uuid | String | 资源的UUID,唯一标示该资源 | 5.2.1 |
| datasetUuid | String | 5.2.1 | |
| modelServiceInstanceGroupUuid | String | 5.2.1 |
SDK示例
Java
SDK
QueryModelServiceInstanceGroupAction action = new QueryModelServiceInstanceGroupAction();
action.conditions = asList();
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryModelServiceInstanceGroupAction.Result res = action.call();Python
SDK
QueryModelServiceInstanceGroupAction action = QueryModelServiceInstanceGroupAction()
action.conditions = []
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryModelServiceInstanceGroupAction.Result res = action.call()