基本信息

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

Method: POST

Content-Type:application/json

请求参数

参数 类型 描述 是否必须

namespance

string

命名空间。

yes

uuid

string

某容器实例 ID。

yes

port

integer

待删除的对外端口号。

yes

protocol

string

协议类型,协议类型,http 或 https,默认值为 http。

no

响应参数

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

参数 类型 描述

data.kuid

string

容器实例的 UUID。

data.status

string

容器实例状态。

data.reason

string

状态原因。

data.user_id

string

用户 ID。

data.root_user_id

string

根用户 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/remove_port' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "uuid": "string",
  "port": 1,
  "protocol": "http"
}'

响应示例

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