获取指定容器实例的详细信息,含状态、资源配置、镜像、定时任务与访问地址。同步返回。
https://api.alayanew.com/api/osm/v1/cci/instance/{id}鉴权(Authorizations)
bearerAuthAuthorizationString必填用户获取Authorization请求头后,通过该请求头完成身份认证。例如:Authorization: [your-auth-header]。
Path Parameters
idString必填实例 ID(来自查询实例列表的 id)。例如:2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88。
Response
application/json · 200statusInteger业务状态码,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
cpuCoresStringCPU 核数。例如:"96"。
memoryGBString内存容量(GB)。例如:"768"。
gpuNameString加速卡型号,无加速卡时为 "-"。例如:"XPU-A100"。
gpuCountString加速卡数量。例如:"8"。
diskGBString系统盘容量(GB)。例如:"200"。
webSSHUrlStringWeb 终端访问地址。例如:"https://ssh.example.com/terminal/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"。
jupyterUrlStringJupyter 访问地址。例如:"https://jupyter.example.com/cci/2006a5d0-0a55-4e8f-9d3c-b7a1f20c5d88"。
vscodeUrlStringVSCode 访问地址。例如:"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"
}
}
}最后更新于
