跳到主要内容

查询工作空间详情

请求方法

GET

请求地址

/api/v1/space/detail

请求参数(query)

参数名参数类型参数释义
space_idNumber必传,空间ID

返回数据

返回数据

参数名参数类型参数释义
codeNumber错误码,0为正常
msgString错误描述
dataData数据Object

Data

参数名参数类型参数释义
spaceSpace空间详情

Space

参数名参数类型参数释义
idNumber空间 ID
nameString空间名称
sku_idNumberSKU ID
regionString可用区唯一标识
statusString状态
reasonString状态原因
imageString镜像名
billing_modeString计费模式
auto_renewBoolean是否自动续费(该字段只有计费模式为包周、包月时才有效,对按量计费无效)
sys_endpoints[]Endpoints系统内置访问入口
custom_endpoints[]Endpoints自定义访问入口
custom_envs[]Env自定义环境变量
command[]String自定义启动命令
auto_stop_timeString自动停止时间。格式为北京时间 YYYY-MM-DD HH:mm:ss
start_timeString开始时间
end_timeString结束时间
feeString已产生费用(元)
create_timeString创建时间

Endpoints

参数名参数类型参数释义
nameString名称
portNumber端口号
protocalString协议
urlString访问地址

Env

参数名参数类型参数释义
nameString变量名
valueString

请求示例

/api/v1/space/detail?space_id=1

返回示例

{
"code": 0,
"msg": "OK",
"data": {
"space": {
"id": 1,
"name": "space-tk1m5rcij6",
"sku_id": 40,
"region": "t1",
"status": "Stopped",
"reason": "",
"image": "base/pytorch:2.4.0-cuda12.4-cudnn9",
"billing_mode": "ByUsage",
"auto_renew": false,
"sys_endpoints": [
{
"name": "main",
"port": 7860,
"protocal": "TCP",
"url": "https://xx.lanrui.co"
},
{
"name": "jupyter",
"port": 8888,
"protocal": "TCP",
"url": "https://xx.lanrui.co"
},
{
"name": "tensorboard",
"port": 6006,
"protocal": "TCP",
"url": "https://xx.lanrui.co"
},
{
"name": "filebrowser",
"port": 8887,
"protocal": "TCP",
"url": "https://xx.lanrui.co"
},
{
"name": "vscode",
"port": 8889,
"protocal": "TCP",
"url": "https://xx.lanrui.co"
}
],
"custom_endpoints": [
{
"name": "",
"port": 8800,
"protocal": "TCP",
"url": "https://xx.lanrui.co"
}
],
"custom_envs": null,
"command": null,
"auto_stop_time": "",
"start_time": "2024-08-23 14:52:31",
"end_time": "2024-08-26 10:35:12",
"fee": "135.40",
"create_time": "2024-08-23 14:38:49"
}
}
}