九章智算云
查询实例详情

获取指定容器实例的详细信息,含状态、资源配置、镜像、定时任务与访问地址。同步返回。

GEThttps://api.alayanew.com/api/osm/v1/cci/instance/{id}

鉴权(Authorizations)

AuthorizationString必填

用户获取Authorization请求头后,通过该请求头完成身份认证。例如:Authorization: [your-auth-header]。

Path Parameters

idString必填

实例 ID(来自查询实例列表的 id)。例如:2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88。

Response

statusInteger

业务状态码,200 表示成功。

messageString

接口响应信息。例如:"OK"。

dataObject

实例详情。

显示 properties
idString

实例 ID。例如:"2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"。

nameString

实例名称。例如:"cci-demo-01"。

descriptionString

实例描述。例如:"训练用容器实例"。

orderInstanceIdString

订阅实例 ID。例如:"b9f0e6c1-8f0f-4b0e-b2f5-6a9d81a4c3e2"。

statusString

实例状态。例如:"RUNNING"。

subStatusString

容器子状态,异常时用于定位问题。

priorityInteger

优先级,1~3,数值越小优先级越高。例如:2。

computeResourceTypeString

计算资源类型:ELASTIC / EXCLUSIVE。例如:"ELASTIC"。

queueTimeoutCancelEnableBoolean

是否启用排队超时自动取消。例如:true。

queueTimeoutHoursLong

排队超时自动取消时长,单位小时。例如:24。

aidcIdLong

智算中心 ID。例如:1。

aidcNameString

智算中心名称。例如:"华东一智算中心"。

aidcOperationStatusString

智算中心运营状态,取不到时为空。例如:"NORMAL"。

createTimeString

创建时间。例如:"2026-10-13 14:30:00"。

startTimeString

最近启动时间。例如:"2026-10-14 09:00:00"。

stopTimeString

最近关机时间,未关机时为空字符串。

autoStopEnableBoolean

是否已设置定时关机。例如:true。

autoStopTimeString

定时关机时间,未设置时为空字符串。例如:"2026-10-14 22:00:00"。

autoReleaseEnableBoolean

是否已设置定时释放。例如:false。

autoReleaseTimeString

定时释放时间,未设置时为空字符串。

imageString

当前使用的镜像地址。例如:"hub.example.com/public/pytorch:2.3-cuda12.1"。

envObject

环境变量键值对,key 为变量名,value 为变量值。

显示 properties
Additional propertiesString

自定义环境变量,键为变量名,值为变量值。例如:"LANG": "en_US.UTF-8"。

skuCodeString

规格编码,无对应订阅时为空。例如:"cci.gpu.g8xlarge"。

skuNameString

规格名称,无对应订阅时为空。例如:"GPU 计算型 g8xlarge"。

resourceObject

资源配置。

显示 properties
cpuCoresString

CPU 核数。例如:"96"。

memoryGBString

内存容量(GB)。例如:"768"。

gpuNameString

加速卡型号,无加速卡时为 "-"。例如:"XPU-A100"。

gpuCountString

加速卡数量。例如:"8"。

diskGBString

系统盘容量(GB)。例如:"200"。

webSSHUrlString

Web 终端访问地址。例如:"https://ssh.example.com/terminal/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"。

jupyterUrlString

Jupyter 访问地址。例如:"https://jupyter.example.com/cci/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"。

vscodeUrlString

VSCode 访问地址。例如:"https://vscode.example.com/cci/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"。

curl -X 'GET' \
  'https://api.alayanew.com/api/osm/v1/cci/instance/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88' \
  -H 'accept: application/json' \
  -H 'Authorization: [your-auth-header]'
import requests

instance_id = "2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"
url = f"https://api.alayanew.com/api/osm/v1/cci/instance/{instance_id}"
headers = {
    "accept": "application/json",
    "Authorization": "[your-auth-header]"
}

response = requests.get(url, headers=headers)
print(response.json())
const instanceId = '2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88';

fetch(`https://api.alayanew.com/api/osm/v1/cci/instance/${instanceId}`, {
  method: 'GET',
  headers: {
    'accept': 'application/json',
    'Authorization': '[your-auth-header]'
  }
})
  .then(res => res.json())
  .then(console.log)
  .catch(console.error);
{
  "status": 200,
  "message": "OK",
  "data": {
    "id": "2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88",
    "name": "cci-demo-01",
    "description": "训练用容器实例",
    "orderInstanceId": "b9f0e6c1-8f0f-4b0e-b2f5-6a9d81a4c3e2",
    "status": "RUNNING",
    "subStatus": "",
    "priority": 2,
    "computeResourceType": "ELASTIC",
    "createTime": "2026-10-13 14:30:00",
    "startTime": "2026-10-14 09:00:00",
    "stopTime": "",
    "autoStopEnable": true,
    "autoStopTime": "2026-10-14 22:00:00",
    "autoReleaseEnable": false,
    "autoReleaseTime": "",
    "image": "hub.example.com/public/pytorch:2.3-cuda12.1",
    "aidcId": 1,
    "aidcName": "华东一智算中心",
    "resource": {
      "cpuCores": "96",
      "memoryGB": "768",
      "gpuName": "XPU-A100",
      "gpuCount": "8",
      "diskGB": "200"
    },
    "skuCode": "cci.gpu.g8xlarge",
    "skuName": "GPU 计算型 g8xlarge",
    "webSSHUrl": "https://ssh.example.com/terminal/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88",
    "jupyterUrl": "https://jupyter.example.com/cci/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88",
    "vscodeUrl": "https://vscode.example.com/cci/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88",
    "queueTimeoutCancelEnable": true,
    "queueTimeoutHours": 24,
    "aidcOperationStatus": "NORMAL",
    "env": {
      "LANG": "en_US.UTF-8"
    }
  }
}

最后更新于