基本信息

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

Method: POST

Content-Type:application/json

请求参数

参数 类型 描述 是否必须

namespance

string

命名空间。

yes

uuids

string

容器实例 ID 列表。

yes

save_image

boolean

是否保存镜像。

no

响应参数

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

参数 类型 描述

data

array<object>

核心数据数组

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

镜像类型标识

data.name

string

容器实例名称

data.server_type

string

服务器规格类型

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 软件包配置

请求示例

curl -X 'POST' \
  'https://ai.coreshub.cn/qai/aicp/notebooks/namespaces/usr-5HY8cxxx/notebooks/stop' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "uuids": [
    "nb-egzgnq0bhxq8"
  ],
  "save_image": true
}'

响应示例

{
  "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-08T08:36:00.609Z",
      "updated_at": "2025-04-08T08:36:00.609Z",
      "namespace": "string",
      "image": "string",
      "image_type": "string",
      "name": "容器实例",
      "server_type": "jupyter",
      "envs": [],
      "stop_time": "2025-04-08T08:36:00.609Z",
      "auto_delete_time": "2025-04-08T08:36:00.609Z",
      "uuid": "string",
      "server": "string",
      "pip": "string",
      "conda": "string",
      "apt": "string"
    }
  ],
  "counts": 0
}