基本信息

Action:/qai/aicp/notebooks/namespaces/{namespace}/notebooks

Method: GET

Content-Type:application/json

请求参数

参数 类型 描述 是否必须

namespace

string

命名空间。

yes

offset

integer

表示数据偏移量,默认值为 0

no

limit

integer

表示返回数据长度,默认值为 10

no

name

string

实例名字,模糊搜索。

no

reverse

boolean

是否倒序排列。

no

order_by

string

排序字段,默认值为创建时间。

no

status

array<string>

运行状态,可输入 PendingRunningFailed 等。

no

endpoints

array<string>

作业类型,用户可通过调用 GetEndpoint API 获取。

no

start_at

string($date-time)

最早创建时间。

no

end_at

string($date-time)

最晚创建时间。

no

owner

tring

拥有者。

no

响应参数

此接口包含的公共响应参数,可参见前文内容,其他参数介绍如下:

参数 类型 描述

data.user_name

string

用户名。

data.email

string

用户邮箱地址。

data.kuid

string

用户唯一标识符 UUID。

data.status

string

当前状态。

data.reason

string

状态原因说明。

data.user_id

string

用户 ID。

data.root_user_id

string

根用户 ID(主账户)。

data.created_at

string(date-time)

创建时间。

data.updated_at

string(date-time)

更新时间。

data.namespace

string

命名空间。

data.image

string

使用的镜像名称或地址。

data.image_type

string

镜像类型,如 official, user 或 custom。

data.name

string

容器实例名称。

data.server_type

string

服务器类型,如 jupyter,code_server,rstudio。

data.envs

array<object>

环境变量配置数组。

data.stop_time

string(date-time)

计划停止时间。

data.auto_delete_time

string(date-time)

自动删除时间。

data.uuid

string

唯一标识符。

data.server

string

服务地址,用于前端进行跳转。

data.pip

string

pip 配置信息。

data.conda

string

conda 配置信息。

data.apt

string

apt 配置信息。

data.ws_url

string

WebSocket URL。

data.volume_specs

array<object>

挂载配置列表。

volume_specs.file_set

string

文件集名称。

volume_specs.mount_path

string

挂载路径。

volume_specs.volume_type

string

挂载类型。

volume_specs.file_type

string

文件类型 (Directory/File)。

volume_specs.quota

integer

配额大小。

volume_specs.permission

string

权限 (rw/ro)。

volume_specs.owner

string

存储拥有者。

data.replica_specs

object

副本规格配置。

data.replica_specs.id

integer

配置记录 ID。

data.replica_specs.replicas

integer

副本数量。

data.replica_specs.specs

string

规格描述文本。

data.replica_specs.replica_type

string

副本类型标识。

data.replica_specs.rg_id

string

资源组 ID。

data.replica_specs.custom_cpu

integer

自定义 CPU 核数。

data.replica_specs.custom_memory

integer

自定义内存。

data.replica_specs.custom_gpu

integer

GPU 卡数量。

data.replica_specs.custom_gpu_list

array<string>

分配的 GPU 设备 ID 列表。

data.replica_specs.custom_gpu_name

string

GPU 型号名称。

data.replica_specs.custom_gpu_memory

string

GPU 显存大小。

data.replica_specs.custom_gpu_type

string

GPU 类型标识。

data.replica_specs.custom_system_disk_size

integer

系统盘大小。

data.replica_specs.custom_data_disk_size

integer

数据盘大小。

data.replica_specs.custom_infiniband

integer

是否启用 InfiniBand (0/1)。

data.replica_specs.custom_aipods_type

string

AI 加速器类型。

data.replica_specs.custom_hashrate_allocation

integer

算力分配值。

data.replica_specs.custom_network_description

string

网络配置描述。

data.replica_specs.custom_cpu_model

string

CPU 具体型号。

data.replica_specs.custom_cpu_manufacturer

string

CPU 制造商。

data.replica_specs.notebook_uuid

string

关联的实例 UUID。

data.servers

array<object>

服务地址列表。

data.pod_ips

array<any>

Pod IP 地址列表。

data.running_time

number(time-delta)

运行时长。

请求示例

curl -X 'GET' \
  'https://ai.coreshub.cn/qai/aicp/notebooks/namespaces/usr-5HY8cxxx/notebooks?offset=0&limit=10&reverse=true&order_by=created_at' \
  -H 'accept: application/json'

响应示例

{
    "message": "success",
    "meta": {
        "X_REQUEST_ID": "310c49bc",
        "X_REQUEST_USER": "usr-5HY8xxxx"
    },
    "data": [
        {
            "image": "xb3-dockerhub.coreshub.cn/aicp/public/llama2-train:pytorch-2.1.2-cuda12.1-cudnn8-with-model",
            "updated_at": "2025-04-10T16:46:06",
            "apt": "ubuntu",
            "servers": [
                {
                    "status": false,
                    "protocol": "http",
                    "server_name": "vscode",
                    "server_type": "vscode",
                    "url": "http://ai.coreshub.cn/xb3a/notebook/coder/usr-5hy8xxxx/nb-eiguqichl5hc/",
                    "target_port": 8889,
                    "password": null
                }
            ],
            "pip": "pypi",
            "pod_ips": [
                {
                    "ip": "10.233.238.25"
                }
            ],
            "volume_specs": [
                {
                    "mount_path": "/dev/shm",
                    "permission": "rw",
                    "file_type": "Directory",
                    "file_set": "/dev/shm",
                    "quota": 1,
                    "volume_type": "SHARED_MEMORY",
                    "pvc_name": "shared-memory-devshm",
                    "owner": "",
                    "notebook_uuid": "nb-eiguqichl5hc",
                    "id": 14520
                }

            ],
            "user_id": "usr-5HY8xxxx",
            "uuid": "nb-eiguqichl5hc",
            "image_type": "official",
            "namespace": "usr-5hy8xxxx",
            "stop_time": null,
            "user_name": "Jxxxx",
            "email": "xxxx@yunify.com",
            "kuid": "b9a485e4-1672-45fa-a90e-5adf0016fe30",
            "status": "Running",
            "replica_specs": {
                "custom_system_disk_size": 30,
                "custom_gpu_memory": "",
                "custom_gpu_name": "",
                "custom_aipods_type": "only_gpu-xb3-1",
                "custom_cpu_manufacturer": "amd",
                "rg_id": null,
                "replica_type": "Worker",
                "custom_cpu": 1,
                "custom_infiniband": 0,
                "notebook_uuid": "nb-eiguqichl5hc",
                "replicas": 1,
                "custom_gpu": 0,
                "id": 2586,
                "custom_gpu_type": "",
                "custom_data_disk_size": 0,
                "custom_network_description": "",
                "custom_cpu_model": "AMD",
                "custom_memory": 2,
                "custom_gpu_list": null,
                "specs": "sku_pmvBGy0J002N",
                "custom_hashrate_allocation": 0
            },
            "server_type": "jupyter",
            "reason": "\u8fd0\u884c\u4e2d",
            "conda": "conda",
            "ws_url": "/aicp/kapi/v1/ws/namespaces/usr-5hy8xxxx/pods/nb-eiguqichl5hc-0/container/nb-eiguqichl5hc/exec",
            "auto_delete_time": null,
            "running_time": 6772.28029,
            "name": "\u5bb9\u5668\u5b9e\u4f8b-1",
            "created_at": "2025-04-10T15:00:33",
            "server": null,
            "envs": [],
            "root_user_id": ""
        }
    ],
    "counts": 1,
    "ret_code": 0
}