获取容器实例服务列表(GetNotebooksServers)
更新时间:2025-05-08 07:50:27
基本信息
Action:/qai/aicp/notebooks/namespaces/{namespace}/notebooks/{uuid}/servers
Method: GET
Content-Type:application/json
请求参数
参数 | 类型 | 描述 | 是否必须 |
---|---|---|---|
uuid |
string |
容器实例 ID。 |
yes |
namespance |
string |
命名空间。 |
yes |
services |
array<object> |
服务类型,包括 jupyter, vscode, ssh, custom, node_port。 |
yes |
响应参数
此接口包含的公共响应参数,可参见前文内容,其他参数介绍如下:
参数 | 类型 | 描述 |
---|---|---|
data |
array<object> |
服务器实例数据数组 |
data.url |
string |
服务器访问 URL |
data.target_port |
integer |
目标服务端口号 |
data.server_type |
string |
服务器类型标识 |
data.server_name |
string |
服务器实例名称 |
data.status |
boolean |
服务状态 (true=运行中/false=停止) |
data.protocol |
string |
连接协议类型 |
data.password |
string |
访问密码(如有) |
请求示例
curl -X 'GET' \
'https://ai.coreshub.cn/qai/aicp/notebooks/namespaces/usr-5HY8cxxx/notebooks/nb-eiguqichl5hc/servers?services=jupyter' \
-H 'accept: application/json'
响应示例
{
"message": "success",
"meta": {
"X_REQUEST_ID": "d8f8859e",
"X_REQUEST_USER": "usr-5HY8xxxx"
},
"data": [
{
"status": true,
"protocol": "http",
"server_name": "jupyter",
"server_type": "jupyter",
"url": "http://ai.coreshub.cn/xb3a/notebook/jupyter/usr-5hy8xxxx/nb-eiguqichl5hc/",
"target_port": 8888,
"password": null
}
],
"counts": 1,
"ret_code": 0
}