基本信息

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

Method: POST

Content-Type:application/json

请求参数

参数 类型 描述 是否必须

uuids

array<string>

需要启动的 Notebook 实例 UUID 数组

yes

sku_id

string

商品规格 ID

yes

custom_spec

object

自定义规格配置(仅限资源组 Notebook使用)

no

custom_spec.replicas

integer

副本数量

no

custom_spec.specs

string

规格描述

no

custom_spec.replica_type

string

副本类型

no

custom_spec.rg_id

string

资源组 ID

no

custom_spec.custom_cpu

integer

自定义 CPU 核数

no

custom_spec.custom_memory

integer

自定义内存大小

no

custom_spec.custom_gpu

integer

自定义 GPU 数量

no

custom_spec.custom_gpu_list

array<string>

自定义 GPU 设备 ID 列表(唯一值)

no

custom_spec.custom_gpu_name

string

自定义 GPU 型号名称

no

custom_spec.custom_gpu_memory

string

自定义 GPU 显存大小

no

custom_spec.custom_gpu_type

string

自定义 GPU 类型

no

custom_spec.custom_system_disk_size

integer

自定义系统盘大小

no

custom_spec.custom_data_disk_size

integer

自定义数据盘大小

no

custom_spec.custom_infiniband

integer

是否启用 InfiniBand(0/1)

no

custom_spec.custom_aipods_type

string

自定义 AI 加速器类型

no

custom_spec.custom_hashrate_allocation

integer

自定义算力分配值

no

custom_spec.custom_network_description

string

自定义网络描述

no

custom_spec.custom_cpu_model

string

自定义 CPU 型号

no

custom_spec.custom_cpu_manufacturer

string

自定义 CPU 制造商

no

custom_spec.template_id

integer

配置模板ID

no

响应参数

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

参数 类型 描述

data.kuid

string

实例的 kuid。

data.status

string

容器实例状态。

data.reason

string

原因。

data.user_id

string

用户 ID。

data.root_user_id

string

root 用户 ID。

data.create_at

string

创建时间。

data.updated_at

string

更新时间。

data.namespace

string

命名空间。

data.image

string

镜像。

data.image_type

string

镜像类型。

data.name

string

容器实例名称。

data.server_type

string

服务类型。

data.envs

string

环境变量列表。

data.stop_time

string

停止时间。

data.auto_delete_time

string

容器实例自动释放时间。

data.uuid

string

容器实例 ID。

data.server

string

服务名称。

data.pip

string

pip 源。

data.conda

string

conda 源。

data.apt

string

apt 源。

请求示例

curl -X 'POST' \
  'https://ai.coreshub.cn/qai/aicp/notebooks/namespaces/usr-5HY8cxxx/notebooks/start' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "uuids": [
    "string"
  ],
  "sku_id": "string",
  "custom_spec": {
    "replicas": 1,
    "specs": "sku-1",
    "replica_type": "Master",
    "rg_id": "rg-1",
    "custom_cpu": 1,
    "custom_memory": 2,
    "custom_gpu": 0
  }
}'

响应示例

{
  "ret_code": 0,
  "message": "success",
  "meta": {
    "X_REQUEST_ID": "string",
    "X_REQUEST_USER": "string"
  },
  "data": [
    {
      "kuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "status": "string",
      "reason": "string",
      "user_id": "string",
      "root_user_id": "",
      "created_at": "2025-04-08T09:07:56.831Z",
      "updated_at": "2025-04-08T09:07:56.831Z",
      "namespace": "string",
      "image": "string",
      "image_type": "string",
      "name": "容器实例",
      "server_type": "jupyter",
      "envs": [],
      "stop_time": "2025-04-08T09:07:56.832Z",
      "auto_delete_time": "2025-04-08T09:07:56.832Z",
      "uuid": "string",
      "server": "string",
      "pip": "string",
      "conda": "string",
      "apt": "string"
    }
  ],
  "counts": 0
}