注意

本文档适用于 Ceph 的开发版本。

Ceph RESTful API

简介

Ceph RESTful API(以下简称 Ceph API)由Ceph Dashboard模块提供。Ceph API 服务与常规 Ceph Dashboard 位于同一 URL 下,基础路径为/api(请参阅主机名和端口

http://<server_addr>:<server_port>/api

如果启用了 HTTPS(请参阅SSL/TLS 支持

https://<server_addr>:<ssl_server_port>/api

Ceph API 利用以下标准:

警告

某些端点仍在积极开发中,应谨慎使用,因为新的 Ceph 版本可能会带来向后不兼容的更改。

身份验证和授权

对 Ceph API 的请求需要通过两个访问控制检查点:

  • 身份验证:确保请求是以现有且有效的用户帐户名义执行的。

  • 授权:确保先前经过身份验证的用户确实可以对目标端点执行特定操作(创建、读取、更新或删除)。

因此,在开始使用 Ceph API 之前,必须获取一个有效的 JSON Web Token (JWT),然后可以在后续请求中重复使用。 /api/auth 端点将提供有效的令牌

curl -X POST "https://example.com:8443/api/auth" \
-H  "Accept: application/vnd.ceph.api.v1.0+json" \
-H  "Content-Type: application/json" \
-d '{"username": <username>, "password": <password>}'
{ "token": "<redacted_token>", ...}

获取的令牌必须在每个 API 请求中通过 Authorization HTTP 标头传递

curl -H "Authorization: Bearer <token>" ...

身份验证和授权可以从 Ceph CLI、Ceph Dashboard UI 和 Ceph API 本身进一步配置(请参阅用户和角色管理)。

版本控制

Ceph API 的主要目标之一是保持稳定的接口。为此,Ceph API 基于以下原则构建:

  • 强制性:为了避免隐式默认值,所有端点都需要一个显式默认版本(从1.0开始)。

  • 按端点划分:由于此 API 封装了许多不同的 Ceph 组件,因此可以实现更细粒度的更改控制。
    • 内容/MIME 类型:特定端点期望的版本由 Accept: application/vnd.ceph.api.v<major>.<minor>+json HTTP 标头声明。如果当前的 Ceph API 服务器无法处理该特定主要版本,则会返回 415 - 不支持的媒体类型响应。

  • 语义版本控制:使用major.minor版本
    • 主要更改向后不兼容:它们可能导致特定端点的请求和/或响应格式发生非附加性更改。

    • 次要更改向后/向前兼容:它们基本上由对特定端点的请求或响应格式的附加性更改组成。

一个例子

curl -X GET "https://example.com:8443/api/osd" \
-H  "Accept: application/vnd.ceph.api.v1.0+json" \
-H  "Authorization: Bearer <token>"

规范

身份验证

POST /api/auth

Dashboard 身份验证

请求示例

POST /api/auth HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "password": "string",
    "ttl": 1,
    "username": "string"
}
状态码:
POST /api/auth/check

检查令牌身份验证

查询参数:
  • token (string) -- 身份验证令牌 (必填)

请求示例

POST /api/auth/check?token=string HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "token": "string"
}
状态码:
POST /api/auth/logout
状态码:

CephFSSnapshotSchedule

POST /api/cephfs/snapshot/schedule

请求示例

POST /api/cephfs/snapshot/schedule HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "fs": "string",
    "group": "string",
    "path": "string",
    "retention_policy": "string",
    "snap_schedule": "string",
    "start": "string",
    "subvol": "string"
}
状态码:
GET /api/cephfs/snapshot/schedule/{fs}
参数:
  • fs (string) --

查询参数:
  • path (string) --

  • recursive (boolean) --

请求示例

GET /api/cephfs/snapshot/schedule/{fs} HTTP/1.1
Host: example.com
状态码:
PUT /api/cephfs/snapshot/schedule/{fs}/{path}
参数:
  • fs (string) --

  • path (string) --

请求示例

PUT /api/cephfs/snapshot/schedule/{fs}/{path} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group": "string",
    "retention_to_add": "string",
    "retention_to_remove": "string",
    "subvol": "string"
}
状态码:
POST /api/cephfs/snapshot/schedule/{fs}/{path}/activate
参数:
  • fs (string) --

  • path (string) --

请求示例

POST /api/cephfs/snapshot/schedule/{fs}/{path}/activate HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group": "string",
    "schedule": "string",
    "start": "string",
    "subvol": "string"
}
状态码:
POST /api/cephfs/snapshot/schedule/{fs}/{path}/deactivate
参数:
  • fs (string) --

  • path (string) --

请求示例

POST /api/cephfs/snapshot/schedule/{fs}/{path}/deactivate HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group": "string",
    "schedule": "string",
    "start": "string",
    "subvol": "string"
}
状态码:
DELETE /api/cephfs/snapshot/schedule/{fs}/{path}/delete_snapshot
参数:
  • fs (string) --

  • path (string) --

查询参数:
  • schedule (string) -- (必填)

  • start (string) -- (必填)

  • retention_policy (string) --

  • subvol (string) --

  • group (string) --

状态码:

CephFSSubvolume

POST /api/cephfs/subvolume

请求示例

POST /api/cephfs/subvolume HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "subvol_name": "string",
    "vol_name": "string"
}
状态码:
DELETE /api/cephfs/subvolume/{vol_name}
参数:
  • vol_name (string) --

查询参数:
  • subvol_name (string) -- (必填)

  • group_name (string) --

  • retain_snapshots (boolean) --

状态码:
GET /api/cephfs/subvolume/{vol_name}
参数:
  • vol_name (string) --

查询参数:
  • group_name (string) --

  • info (boolean) --

请求示例

GET /api/cephfs/subvolume/{vol_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/cephfs/subvolume/{vol_name}
参数:
  • vol_name (string) --

请求示例

PUT /api/cephfs/subvolume/{vol_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group_name": "string",
    "size": 1,
    "subvol_name": "string"
}
状态码:
GET /api/cephfs/subvolume/{vol_name}/exists
参数:
  • vol_name (string) --

查询参数:
  • group_name (string) --

请求示例

GET /api/cephfs/subvolume/{vol_name}/exists HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/subvolume/{vol_name}/info
参数:
  • vol_name (string) --

查询参数:
  • subvol_name (string) -- (必填)

  • group_name (string) --

请求示例

GET /api/cephfs/subvolume/{vol_name}/info?subvol_name=string HTTP/1.1
Host: example.com
状态码:

Cephfs

GET /api/cephfs

请求示例

GET /api/cephfs HTTP/1.1
Host: example.com
状态码:
POST /api/cephfs

请求示例

POST /api/cephfs HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "data_pool": "string",
    "metadata_pool": "string",
    "name": "string",
    "service_spec": "string"
}
状态码:
PUT /api/cephfs/auth

设置给定路径中指定用户 ID 的 Ceph 身份验证功能

请求示例

PUT /api/cephfs/auth HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "caps": "string",
    "client_id": "string",
    "fs_name": "string",
    "root_squash": "string"
}
状态码:
DELETE /api/cephfs/remove/{name}

移除 CephFS 卷

参数:
  • name (string) -- 文件系统名称

状态码:
PUT /api/cephfs/rename

重命名 CephFS 卷

请求示例

PUT /api/cephfs/rename HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "name": "string",
    "new_name": "string"
}
状态码:
GET /api/cephfs/{fs_id}
参数:
  • fs_id (string) --

请求示例

GET /api/cephfs/{fs_id} HTTP/1.1
Host: example.com
状态码:
DELETE /api/cephfs/{fs_id}/client/{client_id}
参数:
  • fs_id (string) --

  • client_id (string) --

状态码:
GET /api/cephfs/{fs_id}/clients
参数:
  • fs_id (string) --

请求示例

GET /api/cephfs/{fs_id}/clients HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/{fs_id}/get_root_directory

无法使用 ls_dir (api) 获取的根目录。:param fs_id: 文件系统标识符。 :return: 根目录 :rtype: dict

参数:
  • fs_id (string) --

请求示例

GET /api/cephfs/{fs_id}/get_root_directory HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/{fs_id}/ls_dir

列出指定路径的目录。:param fs_id: 文件系统标识符。 :param path: 开始列出目录内容的路径。如果未设置,则默认为'/'。 :type path: str | bytes :param depth: 沿目录树向下移动的步数。 :type depth: int | str :return: 指定路径下的目录名称。 :rtype: list

参数:
  • fs_id (string) --

查询参数:
  • path (string) --

  • depth (integer) --

请求示例

GET /api/cephfs/{fs_id}/ls_dir HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/{fs_id}/mds_counters
参数:
  • fs_id (string) --

查询参数:
  • counters (integer) --

请求示例

GET /api/cephfs/{fs_id}/mds_counters HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/{fs_id}/quota

获取指定路径的 Cephfs 配额

获取指定路径的配额。:param fs_id: 文件系统标识符。 :param path: 目录/文件的路径。 :return: 返回包含 'max_bytes' 和 'max_files' 的字典。 :rtype: dict

参数:
  • fs_id (string) -- 文件系统标识符

查询参数:
  • path (string) -- 文件系统路径 (必填)

请求示例

GET /api/cephfs/{fs_id}/quota?path=string HTTP/1.1
Host: example.com
状态码:
PUT /api/cephfs/{fs_id}/quota

设置指定路径的配额。:param fs_id: 文件系统标识符。 :param path: 目录/文件的路径。 :param max_bytes: 字节限制。 :param max_files: 文件限制。

参数:
  • fs_id (string) --

请求示例

PUT /api/cephfs/{fs_id}/quota HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "max_bytes": "string",
    "max_files": "string",
    "path": "string"
}
状态码:
PUT /api/cephfs/{fs_id}/rename-path

重命名文件或目录。:param fs_id: 文件系统标识符。 :param src_path: 现有文件或目录的路径。 :param dst_path: 文件或目录的新名称。

参数:
  • fs_id (string) --

请求示例

PUT /api/cephfs/{fs_id}/rename-path HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "dst_path": "string",
    "src_path": "string"
}
状态码:
DELETE /api/cephfs/{fs_id}/snapshot

移除快照。:param fs_id: 文件系统标识符。 :param path: 目录的路径。 :param name: 快照的名称。

参数:
  • fs_id (string) --

查询参数:
  • path (string) -- (必填)

  • name (string) -- (必填)

状态码:
POST /api/cephfs/{fs_id}/snapshot

创建快照。:param fs_id: 文件系统标识符。 :param path: 目录的路径。 :param name: 快照的名称。如果未指定,将生成一个使用当前时间(RFC3339 UTC 格式)的名称。 :return: 快照的名称。 :rtype: str

参数:
  • fs_id (string) --

请求示例

POST /api/cephfs/{fs_id}/snapshot HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "name": "string",
    "path": "string"
}
状态码:
GET /api/cephfs/{fs_id}/statfs

获取指定路径的 Cephfs statfs

获取指定路径的 statfs。:param fs_id: 文件系统标识符。 :param path: 目录/文件的路径。 :return: 返回包含 'bytes'、'files' 和 'subdirs' 的字典。 :rtype: dict

参数:
  • fs_id (string) -- 文件系统标识符

查询参数:
  • path (string) -- 文件系统路径 (必填)

请求示例

GET /api/cephfs/{fs_id}/statfs?path=string HTTP/1.1
Host: example.com
状态码:
DELETE /api/cephfs/{fs_id}/tree

移除目录。:param fs_id: 文件系统标识符。 :param path: 目录的路径。

参数:
  • fs_id (string) --

查询参数:
  • path (string) -- (必填)

状态码:
POST /api/cephfs/{fs_id}/tree

创建目录。:param fs_id: 文件系统标识符。 :param path: 目录的路径。

参数:
  • fs_id (string) --

请求示例

POST /api/cephfs/{fs_id}/tree HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "path": "string"
}
状态码:

移除文件、链接或符号链接。:param fs_id: 文件系统标识符。 :param path: 要解除链接的文件或链接的路径。

参数:
  • fs_id (string) --

查询参数:
  • path (string) -- (必填)

状态码:
POST /api/cephfs/{fs_id}/write_to_file

将一些数据写入指定的路径。:param fs_id: 文件系统标识符。 :param path: 要写入的文件路径。 :param buf: 要写入缓冲区中的字符串。

参数:
  • fs_id (string) --

请求示例

POST /api/cephfs/{fs_id}/write_to_file HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "buf": "string",
    "path": "string"
}
状态码:

CephfsMirror

GET /api/cephfs/mirror

获取对等体

查询参数:
  • fs_name (string) -- 文件系统名称 (必填)

请求示例

GET /api/cephfs/mirror?fs_name=string HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/mirror/daemon-status

获取镜像守护进程和对等体信息

请求示例

GET /api/cephfs/mirror/daemon-status HTTP/1.1
Host: example.com
状态码:

CephfsSnapshotClone

POST /api/cephfs/subvolume/snapshot/clone

创建子卷快照的克隆

请求示例

POST /api/cephfs/subvolume/snapshot/clone HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "clone_name": "string",
    "group_name": "string",
    "snap_name": "string",
    "subvol_name": "string",
    "target_group_name": "string",
    "vol_name": "string"
}
状态码:

CephfsSubvolumeGroup

POST /api/cephfs/subvolume/group

请求示例

POST /api/cephfs/subvolume/group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group_name": "string",
    "vol_name": "string"
}
状态码:
DELETE /api/cephfs/subvolume/group/{vol_name}
参数:
  • vol_name (string) --

查询参数:
  • group_name (string) -- (必填)

状态码:
GET /api/cephfs/subvolume/group/{vol_name}
参数:
  • vol_name (string) --

查询参数:
  • info (boolean) --

请求示例

GET /api/cephfs/subvolume/group/{vol_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/cephfs/subvolume/group/{vol_name}
参数:
  • vol_name (string) --

请求示例

PUT /api/cephfs/subvolume/group/{vol_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group_name": "string",
    "size": 1
}
状态码:
GET /api/cephfs/subvolume/group/{vol_name}/info
参数:
  • vol_name (string) --

查询参数:
  • group_name (string) -- (必填)

请求示例

GET /api/cephfs/subvolume/group/{vol_name}/info?group_name=string HTTP/1.1
Host: example.com
状态码:

CephfsSubvolumeSnapshot

POST /api/cephfs/subvolume/snapshot

请求示例

POST /api/cephfs/subvolume/snapshot HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "group_name": "string",
    "snap_name": "string",
    "subvol_name": "string",
    "vol_name": "string"
}
状态码:
DELETE /api/cephfs/subvolume/snapshot/{vol_name}/{subvol_name}
参数:
  • vol_name (string) --

  • subvol_name (string) --

查询参数:
  • snap_name (string) -- (必填)

  • group_name (string) --

  • force (boolean) --

状态码:
GET /api/cephfs/subvolume/snapshot/{vol_name}/{subvol_name}
参数:
  • vol_name (string) --

  • subvol_name (string) --

查询参数:
  • group_name (string) --

  • info (boolean) --

请求示例

GET /api/cephfs/subvolume/snapshot/{vol_name}/{subvol_name} HTTP/1.1
Host: example.com
状态码:
GET /api/cephfs/subvolume/snapshot/{vol_name}/{subvol_name}/info
参数:
  • vol_name (string) --

  • subvol_name (string) --

查询参数:
  • snap_name (string) -- (必填)

  • group_name (string) --

请求示例

GET /api/cephfs/subvolume/snapshot/{vol_name}/{subvol_name}/info?snap_name=string HTTP/1.1
Host: example.com
状态码:

Cluster

GET /api/cluster

获取集群状态

请求示例

GET /api/cluster HTTP/1.1
Host: example.com
状态码:
PUT /api/cluster

更新集群状态

请求示例

PUT /api/cluster HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "status": "string"
}
状态码:
GET /api/cluster/user

获取 Ceph 用户列表

获取 Ceph 用户列表及其相关数据

请求示例

GET /api/cluster/user HTTP/1.1
Host: example.com
状态码:
POST /api/cluster/user

创建 Ceph 用户

添加具有其定义功能的 Ceph 用户。

请求示例

POST /api/cluster/user HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "capabilities": [
        {
            "cap": "string",
            "entity": "string"
        }
    ],
    "import_data": "string",
    "user_entity": "string"
}
状态码:
PUT /api/cluster/user

编辑 Ceph 用户功能

更改 ceph 用户功能。设置新功能将覆盖当前功能。

请求示例

PUT /api/cluster/user HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "capabilities": [
        {
            "cap": "string",
            "entity": "string"
        }
    ],
    "user_entity": "string"
}
状态码:
POST /api/cluster/user/export

导出 Ceph 用户

请求示例

POST /api/cluster/user/export HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "entities": [
        "string"
    ]
}
状态码:
DELETE /api/cluster/user/{user_entities}

删除一个或多个 Ceph 用户

删除一个或多个 ceph 用户及其定义的功能。user_entities: 要删除的用户的逗号分隔字符串

参数:
  • user_entities (string) --

状态码:

ClusterConfiguration

GET /api/cluster_conf

请求示例

GET /api/cluster_conf HTTP/1.1
Host: example.com
状态码:
POST /api/cluster_conf

创建/更新集群配置

请求示例

POST /api/cluster_conf HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "force_update": true,
    "name": "string",
    "value": [
        {
            "section": "string",
            "value": "string"
        }
    ]
}
状态码:
PUT /api/cluster_conf

请求示例

PUT /api/cluster_conf HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "options": "string"
}
状态码:
GET /api/cluster_conf/filter

按名称获取集群配置

查询参数:
  • names (string) -- 配置选项名称

请求示例

GET /api/cluster_conf/filter HTTP/1.1
Host: example.com
状态码:
DELETE /api/cluster_conf/{name}
参数:
  • name (string) --

查询参数:
  • section (string) -- (必填)

状态码:
GET /api/cluster_conf/{name}
参数:
  • name (string) --

请求示例

GET /api/cluster_conf/{name} HTTP/1.1
Host: example.com
状态码:

CrushRule

GET /api/crush_rule

列出 Crush 规则配置

请求示例

GET /api/crush_rule HTTP/1.1
Host: example.com
状态码:
POST /api/crush_rule

请求示例

POST /api/crush_rule HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "device_class": "string",
    "failure_domain": "string",
    "name": "string",
    "pool_type": "string",
    "profile": "string",
    "root": "string"
}
状态码:
DELETE /api/crush_rule/{name}
参数:
  • name (string) --

状态码:
GET /api/crush_rule/{name}
参数:
  • name (string) --

请求示例

GET /api/crush_rule/{name} HTTP/1.1
Host: example.com
状态码:

Daemon

GET /api/daemon

列出集群中的所有守护进程。也可以按指定的守护进程类型过滤

param daemon_types:

要过滤的守护进程类型列表。

return:

返回守护进程列表。

rtype:

列出

查询参数:
  • daemon_types (string) --

请求示例

GET /api/daemon HTTP/1.1
Host: example.com
状态码:
PUT /api/daemon/{daemon_name}
参数:
  • daemon_name (string) --

请求示例

PUT /api/daemon/{daemon_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "action": "string",
    "container_image": "string"
}
状态码:

ErasureCodeProfile

GET /api/erasure_code_profile

列出纠删码配置文件信息

请求示例

GET /api/erasure_code_profile HTTP/1.1
Host: example.com
状态码:
POST /api/erasure_code_profile

请求示例

POST /api/erasure_code_profile HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "name": "string"
}
状态码:
DELETE /api/erasure_code_profile/{name}
参数:
  • name (string) --

状态码:
GET /api/erasure_code_profile/{name}
参数:
  • name (string) --

请求示例

GET /api/erasure_code_profile/{name} HTTP/1.1
Host: example.com
状态码:

FeatureTogglesEndpoint

GET /api/feature_toggles

获取功能列表

请求示例

GET /api/feature_toggles HTTP/1.1
Host: example.com
状态码:

Grafana

POST /api/grafana/dashboards
状态码:
GET /api/grafana/url

列出 Grafana URL 实例

请求示例

GET /api/grafana/url HTTP/1.1
Host: example.com
状态码:
GET /api/grafana/validation/{params}
参数:
  • params (string) --

请求示例

GET /api/grafana/validation/{params} HTTP/1.1
Host: example.com
状态码:

Hardware

GET /api/hardware/summary

检索硬件健康状态摘要

获取尽可能多的硬件类别的健康状态,如果未给定类别,则获取所有类别的健康状态 :param categories: 硬件类型,默认为所有类型 :param hostname: 要检索的主机名,默认为所有主机名

查询参数:
  • categories (string) --

  • hostname (string) --

请求示例

GET /api/hardware/summary HTTP/1.1
Host: example.com
状态码:

Health

GET /api/health/full

获取集群的详细健康报告

请求示例

GET /api/health/full HTTP/1.1
Host: example.com
状态码:
GET /api/health/get_cluster_capacity

请求示例

GET /api/health/get_cluster_capacity HTTP/1.1
Host: example.com
状态码:
GET /api/health/get_cluster_fsid

请求示例

GET /api/health/get_cluster_fsid HTTP/1.1
Host: example.com
状态码:
GET /api/health/get_telemetry_status

请求示例

GET /api/health/get_telemetry_status HTTP/1.1
Host: example.com
状态码:
GET /api/health/minimal

获取详细信息较少的集群健康报告

请求示例

GET /api/health/minimal HTTP/1.1
Host: example.com
状态码:
GET /api/health/snapshot

获取集群健康状况的快速概述,类似于 CLI 中的 ceph status 命令。

请求示例

GET /api/health/snapshot HTTP/1.1
Host: example.com
状态码:

Host

GET /api/host

列出主机规范

查询参数:
  • sources (string) -- 主机来源

  • facts (boolean) -- 主机事实

  • offset (integer) --

  • limit (integer) --

  • search (string) --

  • sort (string) --

  • include_service_instances (boolean) -- 包括服务实例

请求示例

GET /api/host HTTP/1.1
Host: example.com
状态码:
POST /api/host

请求示例

POST /api/host HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "addr": "string",
    "hostname": "string",
    "labels": [
        "string"
    ],
    "status": "string"
}
状态码:
DELETE /api/host/{hostname}
参数:
  • hostname (string) --

状态码:
GET /api/host/{hostname}

获取指定的主机。 :raises: cherrypy.HTTPError: 如果找不到主机。

参数:
  • hostname (string) --

请求示例

GET /api/host/{hostname} HTTP/1.1
Host: example.com
状态码:
PUT /api/host/{hostname}

更新指定的主机。请注意,仅在启用 Ceph Orchestrator 时才支持此功能。 :param hostname: 要处理的主机名。 :param update_labels: 更新标签。 :param labels: 标签列表。 :param maintenance: 进入/退出维护模式。 :param force: 强制进入维护模式。 :param drain: 耗尽主机

参数:
  • hostname (string) -- 主机名

请求示例

PUT /api/host/{hostname} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "drain": true,
    "force": true,
    "labels": [
        "string"
    ],
    "maintenance": true,
    "update_labels": true
}
状态码:
GET /api/host/{hostname}/daemons
参数:
  • hostname (string) --

请求示例

GET /api/host/{hostname}/daemons HTTP/1.1
Host: example.com
状态码:
GET /api/host/{hostname}/devices
参数:
  • hostname (string) --

请求示例

GET /api/host/{hostname}/devices HTTP/1.1
Host: example.com
状态码:
POST /api/host/{hostname}/identify_device

通过打开设备灯 N 秒来识别设备。 :param hostname: 要处理的设备的主机名。 :param device: 要处理的设备标识符,例如 /dev/dm-0ABC1234DEF567-1R1234_ABC8DE0Q。 :param duration: LED 闪烁的持续时间(以秒为单位)。

参数:
  • hostname (string) --

请求示例

POST /api/host/{hostname}/identify_device HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "device": "string",
    "duration": "string"
}
状态码:
GET /api/host/{hostname}/inventory

获取主机的清单

参数:
  • hostname (string) -- 主机名

查询参数:
  • refresh (string) -- 触发异步刷新

请求示例

GET /api/host/{hostname}/inventory HTTP/1.1
Host: example.com
状态码:
GET /api/host/{hostname}/smart
参数:
  • hostname (string) --

请求示例

GET /api/host/{hostname}/smart HTTP/1.1
Host: example.com
状态码:

Iscsi

GET /api/iscsi/discoveryauth

获取 Iscsi discoveryauth 详细信息

请求示例

GET /api/iscsi/discoveryauth HTTP/1.1
Host: example.com
状态码:
PUT /api/iscsi/discoveryauth

设置 Iscsi discoveryauth

查询参数:
  • user (string) -- 用户名 (必填)

  • password (string) -- 密码 (必填)

  • mutual_user (string) -- 相互用户名 (必填)

  • mutual_password (string) -- 相互密码 (必填)

请求示例

PUT /api/iscsi/discoveryauth?user=string&password=string&mutual_user=string&mutual_password=string HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "mutual_password": "string",
    "mutual_user": "string",
    "password": "string",
    "user": "string"
}
状态码:

IscsiTarget

GET /api/iscsi/target

请求示例

GET /api/iscsi/target HTTP/1.1
Host: example.com
状态码:
POST /api/iscsi/target

请求示例

POST /api/iscsi/target HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "acl_enabled": "string",
    "auth": "string",
    "clients": "string",
    "disks": "string",
    "groups": "string",
    "portals": "string",
    "target_controls": "string",
    "target_iqn": "string"
}
状态码:
DELETE /api/iscsi/target/{target_iqn}
参数:
  • target_iqn (string) --

状态码:
GET /api/iscsi/target/{target_iqn}
参数:
  • target_iqn (string) --

请求示例

GET /api/iscsi/target/{target_iqn} HTTP/1.1
Host: example.com
状态码:
PUT /api/iscsi/target/{target_iqn}
参数:
  • target_iqn (string) --

请求示例

PUT /api/iscsi/target/{target_iqn} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "acl_enabled": "string",
    "auth": "string",
    "clients": "string",
    "disks": "string",
    "groups": "string",
    "new_target_iqn": "string",
    "portals": "string",
    "target_controls": "string"
}
状态码:

Logs

GET /api/logs/all

显示日志配置

请求示例

GET /api/logs/all HTTP/1.1
Host: example.com
状态码:

MdsPerfCounter

GET /api/perf_counters/mds/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/mds/{service_id} HTTP/1.1
Host: example.com
状态码:

MgrModule

GET /api/mgr/module

列出 Mgr 模块

获取托管模块列表。 :return: 包含 'enabled'、'name' 和 'options' 字段的对象列表。 :rtype: list

请求示例

GET /api/mgr/module HTTP/1.1
Host: example.com
状态码:
GET /api/mgr/module/{module_name}

检索持久配置设置的值。 :param module_name: Ceph Mgr 模块的名称。 :type module_name: str :return: 模块选项的值。 :rtype: dict

参数:
  • module_name (string) --

请求示例

GET /api/mgr/module/{module_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/mgr/module/{module_name}

设置持久配置设置的值。 :param module_name: Ceph Mgr 模块的名称。 :type module_name: str :param config: 要存储的模块选项的值。 :type config: dict

参数:
  • module_name (string) --

请求示例

PUT /api/mgr/module/{module_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "config": "string"
}
状态码:
POST /api/mgr/module/{module_name}/disable

禁用指定的 Ceph Mgr 模块。 :param module_name: Ceph Mgr 模块的名称。 :type module_name: str

参数:
  • module_name (string) --

状态码:
POST /api/mgr/module/{module_name}/enable

启用指定的 Ceph Mgr 模块。 :param module_name: Ceph Mgr 模块的名称。 :type module_name: str

参数:
  • module_name (string) --

状态码:
GET /api/mgr/module/{module_name}/options

获取指定的 Ceph Mgr 模块的模块选项。 :param module_name: Ceph Mgr 模块的名称。 :type module_name: str :return: 模块选项列表(字典列表)。 :rtype: list

参数:
  • module_name (string) --

请求示例

GET /api/mgr/module/{module_name}/options HTTP/1.1
Host: example.com
状态码:

MgrPerfCounter

GET /api/perf_counters/mgr/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/mgr/{service_id} HTTP/1.1
Host: example.com
状态码:

MonPerfCounter

GET /api/perf_counters/mon/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/mon/{service_id} HTTP/1.1
Host: example.com
状态码:

Monitor

GET /api/monitor

获取 Monitor 详细信息

请求示例

GET /api/monitor HTTP/1.1
Host: example.com
状态码:

Multi-cluster

POST /api/multi-cluster/auth

向远程集群进行身份验证

请求示例

POST /api/multi-cluster/auth HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "cluster_alias": "string",
    "hub_url": "string",
    "password": "string",
    "ssl_certificate": "string",
    "ssl_verify": true,
    "ttl": "string",
    "url": "string",
    "username": "string"
}
状态码:
GET /api/multi-cluster/check_token_status

请求示例

GET /api/multi-cluster/check_token_status HTTP/1.1
Host: example.com
状态码:
DELETE /api/multi-cluster/delete_cluster/{cluster_name}/{cluster_user}
参数:
  • cluster_name (string) --

  • cluster_user (string) --

状态码:
PUT /api/multi-cluster/edit_cluster

请求示例

PUT /api/multi-cluster/edit_cluster HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "cluster_alias": "string",
    "name": "string",
    "ssl_certificate": "string",
    "url": "string",
    "username": "string",
    "verify": true
}
状态码:
GET /api/multi-cluster/get_config

请求示例

GET /api/multi-cluster/get_config HTTP/1.1
Host: example.com
状态码:
GET /api/multi-cluster/get_prometheus_api_url

请求示例

GET /api/multi-cluster/get_prometheus_api_url HTTP/1.1
Host: example.com
状态码:
PUT /api/multi-cluster/reconnect_cluster

请求示例

PUT /api/multi-cluster/reconnect_cluster HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "cluster_token": "string",
    "password": "string",
    "ssl_certificate": "string",
    "ssl_verify": true,
    "ttl": "string",
    "url": "string",
    "username": "string"
}
状态码:
GET /api/multi-cluster/security_config

请求示例

GET /api/multi-cluster/security_config HTTP/1.1
Host: example.com
状态码:
PUT /api/multi-cluster/set_config

请求示例

PUT /api/multi-cluster/set_config HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "config": "string"
}
状态码:

NFS-Ganesha

GET /api/nfs-ganesha/cluster
查询参数:
  • info (boolean) --

请求示例

GET /api/nfs-ganesha/cluster HTTP/1.1
Host: example.com
状态码:
GET /api/nfs-ganesha/export

列出所有或特定集群的 NFS-Ganesha 导出

查询参数:
  • cluster_id (string) --

请求示例

GET /api/nfs-ganesha/export HTTP/1.1
Host: example.com
状态码:
POST /api/nfs-ganesha/export

创建新的 NFS-Ganesha 导出

请求示例

POST /api/nfs-ganesha/export HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access_type": "string",
    "clients": [
        {
            "access_type": "string",
            "addresses": [
                "string"
            ],
            "squash": "string"
        }
    ],
    "cluster_id": "string",
    "fsal": {
        "fs_name": "string",
        "name": "string",
        "sec_label_xattr": "string"
    },
    "path": "string",
    "protocols": [
        1
    ],
    "pseudo": "string",
    "security_label": "string",
    "squash": "string",
    "transports": [
        "string"
    ]
}
状态码:
DELETE /api/nfs-ganesha/export/{cluster_id}/{export_id}

删除 NFS-Ganesha 导出

参数:
  • cluster_id (string) -- 集群标识符

  • export_id (integer) -- 导出 ID

状态码:
GET /api/nfs-ganesha/export/{cluster_id}/{export_id}

获取 NFS-Ganesha 导出

参数:
  • cluster_id (string) -- 集群标识符

  • export_id (string) -- 导出 ID

请求示例

GET /api/nfs-ganesha/export/{cluster_id}/{export_id} HTTP/1.1
Host: example.com
状态码:
PUT /api/nfs-ganesha/export/{cluster_id}/{export_id}

更新 NFS-Ganesha 导出

参数:
  • cluster_id (string) -- 集群标识符

  • export_id (integer) -- 导出 ID

请求示例

PUT /api/nfs-ganesha/export/{cluster_id}/{export_id} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access_type": "string",
    "clients": [
        {
            "access_type": "string",
            "addresses": [
                "string"
            ],
            "squash": "string"
        }
    ],
    "fsal": {
        "fs_name": "string",
        "name": "string",
        "sec_label_xattr": "string"
    },
    "path": "string",
    "protocols": [
        1
    ],
    "pseudo": "string",
    "security_label": "string",
    "squash": "string",
    "transports": [
        "string"
    ]
}
状态码:

NVMe-oF Gateway

GET /api/nvmeof/gateway

获取有关 NVMeoF 网关的信息

查询参数:
  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/gateway HTTP/1.1
Host: example.com
状态码:
GET /api/nvmeof/gateway/group

请求示例

GET /api/nvmeof/gateway/group HTTP/1.1
Host: example.com
状态码:
GET /api/nvmeof/gateway/listener_info/{nqn}

获取 NVMeoF 网关的监听器信息

参数:
  • nqn (string) --

查询参数:
  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/gateway/listener_info/{nqn} HTTP/1.1
Host: example.com
状态码:
GET /api/nvmeof/gateway/log_level

获取 NVMeoF 网关日志级别信息

查询参数:
  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/gateway/log_level HTTP/1.1
Host: example.com
状态码:
PUT /api/nvmeof/gateway/log_level

设置 NVMeoF 网关日志级别

请求示例

PUT /api/nvmeof/gateway/log_level HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "log_level": "string",
    "traddr": "string"
}
状态码:
GET /api/nvmeof/gateway/stats

获取网关的 NVMeoF 统计信息

查询参数:
  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/gateway/stats HTTP/1.1
Host: example.com
状态码:
GET /api/nvmeof/gateway/version

获取 NVMeoF 网关的版本

查询参数:
  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/gateway/version HTTP/1.1
Host: example.com
状态码:

NVMe-oF SPDK

GET /api/nvmeof/spdk/log_level

获取 NVMeoF 网关 spdk 日志级别

查询参数:
  • all_log_flags (string) --

  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/spdk/log_level HTTP/1.1
Host: example.com
状态码:
PUT /api/nvmeof/spdk/log_level

设置 NVMeoF 网关 spdk 日志级别

请求示例

PUT /api/nvmeof/spdk/log_level HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "extra_log_flags": "string",
    "gw_group": "string",
    "log_level": "string",
    "print_level": "string",
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/spdk/log_level/disable

禁用 NVMeoF 网关 spdk 日志

请求示例

PUT /api/nvmeof/spdk/log_level/disable HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "extra_log_flags": "string",
    "gw_group": "string",
    "traddr": "string"
}
状态码:

NVMe-oF Subsystem

GET /api/nvmeof/subsystem

列出所有 NVMeoF 子系统

查询参数:
  • gw_group (string) --

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem HTTP/1.1
Host: example.com
状态码:
POST /api/nvmeof/subsystem

创建新的 NVMeoF 子系统

请求示例

POST /api/nvmeof/subsystem HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "dhchap_key": 1,
    "enable_ha": true,
    "gw_group": "string",
    "max_namespaces": 1,
    "no_group_append": 1,
    "nqn": "string",
    "serial_number": 1,
    "traddr": "string"
}
状态码:
DELETE /api/nvmeof/subsystem/{nqn}

删除现有的 NVMeoF 子系统

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

查询参数:
  • force (boolean) -- 强制删除

  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

状态码:
GET /api/nvmeof/subsystem/{nqn}

从特定的 NVMeoF 子系统获取信息

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn} HTTP/1.1
Host: example.com
状态码:

NVMe-oF Subsystem Connection

GET /api/nvmeof/subsystem/{nqn}/connection

列出所有 NVMeoF 子系统连接

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn}/connection HTTP/1.1
Host: example.com
状态码:

NVMe-oF Subsystem Host Allowlist

GET /api/nvmeof/subsystem/{nqn}/host

列出 NVMeoF 子系统的所有允许主机

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

查询参数:
  • clear_alerts (boolean) -- 在获取值后清除任何主机警报信号

  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn}/host HTTP/1.1
Host: example.com
状态码:
POST /api/nvmeof/subsystem/{nqn}/host

允许主机访问 NVMeoF 子系统

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

请求示例

POST /api/nvmeof/subsystem/{nqn}/host HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "dhchap_key": "string",
    "gw_group": "string",
    "host_nqn": "string",
    "psk": "string",
    "traddr": "string"
}
状态码:
DELETE /api/nvmeof/subsystem/{nqn}/host/{host_nqn}

禁止主机访问 NVMeoF 子系统

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • host_nqn (string) -- NVMeoF 主机 NQN。使用“*”表示禁止任何主机。

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

状态码:

NVMe-oF Subsystem Listener

GET /api/nvmeof/subsystem/{nqn}/listener

列出所有 NVMeoF 监听器

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn}/listener HTTP/1.1
Host: example.com
状态码:
POST /api/nvmeof/subsystem/{nqn}/listener

创建新的 NVMeoF 监听器

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

请求示例

POST /api/nvmeof/subsystem/{nqn}/listener HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "adrfam": 1,
    "gw_group": "string",
    "host_name": "string",
    "traddr": "string",
    "trsvcid": 1
}
状态码:
DELETE /api/nvmeof/subsystem/{nqn}/listener/{host_name}/{traddr}

删除现有的 NVMeoF 监听器

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • host_name (string) -- NVMeoF 主机名

  • traddr (string) -- NVMeoF 传输地址

查询参数:
  • trsvcid (integer) -- NVMeoF 传输服务端口

  • adrfam (integer) -- NVMeoF 地址族(0 - IPv4,1 - IPv6)

  • force (boolean) --

  • gw_group (string) -- NVMeoF 网关组

状态码:

NVMe-oF Subsystem Namespace

GET /api/nvmeof/subsystem/{nqn}/namespace

列出子系统中的所有 NVMeoF 命名空间

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

查询参数:
  • nsid (string) -- NVMeoF 命名空间 ID 以进行过滤

  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn}/namespace HTTP/1.1
Host: example.com
状态码:
POST /api/nvmeof/subsystem/{nqn}/namespace

创建新的 NVMeoF 命名空间。

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

请求示例

POST /api/nvmeof/subsystem/{nqn}/namespace HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "block_size": 1,
    "create_image": true,
    "disable_auto_resize": "string",
    "force": true,
    "gw_group": "string",
    "load_balancing_group": 1,
    "no_auto_visible": true,
    "nsid": "string",
    "rbd_image_name": "string",
    "rbd_image_size": 1,
    "rbd_pool": "string",
    "read_only": "string",
    "size": 1,
    "traddr": "string",
    "trash_image": true
}
状态码:
DELETE /api/nvmeof/subsystem/{nqn}/namespace/{nsid}

删除现有的 NVMeoF 命名空间

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

  • force (string) -- 强制删除 RBD 镜像

状态码:
GET /api/nvmeof/subsystem/{nqn}/namespace/{nsid}

从指定的 NVMeoF 命名空间获取信息

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn}/namespace/{nsid} HTTP/1.1
Host: example.com
状态码:
PATCH /api/nvmeof/subsystem/{nqn}/namespace/{nsid}

更新现有的 NVMeoF 命名空间

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PATCH /api/nvmeof/subsystem/{nqn}/namespace/{nsid} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "load_balancing_group": 1,
    "r_mbytes_per_second": 1,
    "rbd_image_size": 1,
    "rw_ios_per_second": 1,
    "rw_mbytes_per_second": 1,
    "traddr": "string",
    "trash_image": true,
    "w_mbytes_per_second": 1
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/add_host

将主机添加到指定的 NVMeoF 命名空间

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/add_host HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "force": true,
    "gw_group": "string",
    "host_nqn": "string",
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/change_load_balancing_group

为指定的 NVMeoF 命名空间设置负载平衡组

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/change_load_balancing_group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "load_balancing_group": 1,
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/change_visibility

更改指定的 NVMeoF 命名空间对所有或选定主机的可见性

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/change_visibility HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "auto_visible": true,
    "force": true,
    "gw_group": "string",
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/del_host

从指定的 NVMeoF 命名空间中移除主机

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/del_host HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "host_nqn": "string",
    "traddr": "string"
}
状态码:
GET /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/io_stats

从指定的 NVMeoF 命名空间获取 IO 统计信息

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

查询参数:
  • gw_group (string) -- NVMeoF 网关组

  • traddr (string) --

请求示例

GET /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/io_stats HTTP/1.1
Host: example.com
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/refresh_size

将指定的 NVMeoF 命名空间刷新到当前的 RBD 镜像大小

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/refresh_size HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/resize

调整指定的 NVMeoF 命名空间大小

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/resize HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "rbd_image_size": 1,
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_auto_resize

启用或禁用 RBD 镜像调整大小时的命名空间自动调整大小

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_auto_resize HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "auto_resize_enabled": true,
    "gw_group": "string",
    "traddr": "string"
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_qos

为指定的 NVMeoF 命名空间设置 QOS

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_qos HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "force": true,
    "gw_group": "string",
    "r_mbytes_per_second": 1,
    "rw_ios_per_second": 1,
    "rw_mbytes_per_second": 1,
    "traddr": "string",
    "w_mbytes_per_second": 1
}
状态码:
PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_rbd_trash_image

更改指定的 NVMeoF 命名空间删除时对所有或选定主机的 trash 镜像

参数:
  • nqn (string) -- NVMeoF 子系统 NQN

  • nsid (string) -- NVMeoF 命名空间 ID

请求示例

PUT /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/set_rbd_trash_image HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "gw_group": "string",
    "rbd_trash_image_on_delete": true,
    "traddr": "string"
}
状态码:

OSD

GET /api/osd
查询参数:
  • offset (integer) --

  • limit (integer) --

  • search (string) --

  • sort (string) --

请求示例

GET /api/osd HTTP/1.1
Host: example.com
状态码:
POST /api/osd

请求示例

POST /api/osd HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "data": "string",
    "method": "string",
    "tracking_id": "string"
}
状态码:
GET /api/osd/flags

显示 OSD 标志

请求示例

GET /api/osd/flags HTTP/1.1
Host: example.com
状态码:
PUT /api/osd/flags

为整个集群设置 OSD 标志。

recovery_deletessortbitwisepglog_hardlimit 标志无法取消设置。purged_snapshots 甚至无法设置。因此,成功的操作需要至少包括这四个标志。

请求示例

PUT /api/osd/flags HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "flags": [
        "string"
    ]
}
状态码:
GET /api/osd/flags/individual

显示单个 OSD 标志

请求示例

GET /api/osd/flags/individual HTTP/1.1
Host: example.com
状态码:
PUT /api/osd/flags/individual

为单个 OSD 子集设置 OSD 标志。

更新单个 OSD 子集的标志(nooutnoinnodownnoup)。

请求示例

PUT /api/osd/flags/individual HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "flags": {
        "nodown": true,
        "noin": true,
        "noout": true,
        "noup": true
    },
    "ids": [
        1
    ]
}
状态码:
GET /api/osd/safe_to_delete
type ids:

int|[int]

查询参数:
  • svc_ids (string) -- (必填)

请求示例

GET /api/osd/safe_to_delete?svc_ids=string HTTP/1.1
Host: example.com
状态码:
GET /api/osd/safe_to_destroy

检查 OSD 是否可以安全销毁

type ids:

int|[int]

查询参数:
  • ids (string) -- OSD 服务标识符 (必填)

请求示例

GET /api/osd/safe_to_destroy?ids=string HTTP/1.1
Host: example.com
状态码:
GET /api/osd/settings

请求示例

GET /api/osd/settings HTTP/1.1
Host: example.com
状态码:
DELETE /api/osd/{svc_id}
参数:
  • svc_id (string) --

查询参数:
  • preserve_id (string) --

  • force (string) --

状态码:
GET /api/osd/{svc_id}

返回有关 OSD 收集的数据。

return:

返回请求的数据。

参数:
  • svc_id (string) --

请求示例

GET /api/osd/{svc_id} HTTP/1.1
Host: example.com
状态码:
PUT /api/osd/{svc_id}
参数:
  • svc_id (string) --

请求示例

PUT /api/osd/{svc_id} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "device_class": "string"
}
状态码:
POST /api/osd/{svc_id}/destroy

将 osd 标记为正在销毁。保持 ID 不变(允许重用),但移除 cephx 密钥、config-key 数据和锁箱密钥,使数据永久不可读。

osd 在销毁之前必须标记为 down。

参数:
  • svc_id (string) --

状态码:
GET /api/osd/{svc_id}/devices
参数:
  • svc_id (string) --

请求示例

GET /api/osd/{svc_id}/devices HTTP/1.1
Host: example.com
状态码:
GET /api/osd/{svc_id}/histogram
return:

返回直方图数据。

参数:
  • svc_id (string) --

请求示例

GET /api/osd/{svc_id}/histogram HTTP/1.1
Host: example.com
状态码:
PUT /api/osd/{svc_id}/mark

标记 OSD 标志(out、in、down、lost 等)

注意:osd 在标记 lost 之前必须标记为 down

参数:
  • svc_id (string) -- SVC ID

请求示例

PUT /api/osd/{svc_id}/mark HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "action": "string"
}
状态码:
POST /api/osd/{svc_id}/purge

注意:osd 在移除之前必须标记为 down

参数:
  • svc_id (string) --

状态码:
POST /api/osd/{svc_id}/reweight

暂时重新加权 OSD。

请注意,'ceph osd reweight' 不是持久设置。当 OSD 被标记为 out 时,osd 权重将设置为 0。当它再次被标记为 in 时,权重将更改为 1。

正因为如此,'ceph osd reweight' 只是一个临时解决方案。您应该只在订购更多硬件时使用它来保持集群运行。

参数:
  • svc_id (string) --

请求示例

POST /api/osd/{svc_id}/reweight HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "weight": "string"
}
状态码:
POST /api/osd/{svc_id}/scrub
参数:
  • svc_id (string) --

查询参数:
  • deep (boolean) --

请求示例

POST /api/osd/{svc_id}/scrub HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "deep": true
}
状态码:
GET /api/osd/{svc_id}/smart
参数:
  • svc_id (string) --

请求示例

GET /api/osd/{svc_id}/smart HTTP/1.1
Host: example.com
状态码:

OsdPerfCounter

GET /api/perf_counters/osd/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/osd/{service_id} HTTP/1.1
Host: example.com
状态码:

PerfCounters

GET /api/perf_counters

显示性能计数器

请求示例

GET /api/perf_counters HTTP/1.1
Host: example.com
状态码:

Pool

GET /api/pool

显示池列表

查询参数:
  • attrs (string) -- 池属性

  • stats (boolean) -- 池统计信息

请求示例

GET /api/pool HTTP/1.1
Host: example.com
状态码:
POST /api/pool

请求示例

POST /api/pool HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "pool": "string"
}
状态码:
DELETE /api/pool/{pool_name}
参数:
  • pool_name (string) --

状态码:
GET /api/pool/{pool_name}
参数:
  • pool_name (string) --

查询参数:
  • attrs (string) --

  • stats (boolean) --

请求示例

GET /api/pool/{pool_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/pool/{pool_name}
参数:
  • pool_name (string) --

请求示例

PUT /api/pool/{pool_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "application_metadata": "string",
    "configuration": "string",
    "flags": "string",
    "rbd_mirroring": "string"
}
状态码:
GET /api/pool/{pool_name}/configuration
参数:
  • pool_name (string) --

请求示例

GET /api/pool/{pool_name}/configuration HTTP/1.1
Host: example.com
状态码:

Prometheus

GET /api/prometheus
查询参数:
  • cluster_filter (boolean) --

请求示例

GET /api/prometheus HTTP/1.1
Host: example.com
状态码:
GET /api/prometheus/alertgroup
查询参数:
  • cluster_filter (boolean) --

请求示例

GET /api/prometheus/alertgroup HTTP/1.1
Host: example.com
状态码:
GET /api/prometheus/data

请求示例

GET /api/prometheus/data HTTP/1.1
Host: example.com
状态码:
GET /api/prometheus/prometheus_query_data

请求示例

GET /api/prometheus/prometheus_query_data HTTP/1.1
Host: example.com
状态码:
GET /api/prometheus/rules

请求示例

GET /api/prometheus/rules HTTP/1.1
Host: example.com
状态码:
POST /api/prometheus/silence
状态码:
DELETE /api/prometheus/silence/{s_id}
参数:
  • s_id (string) --

状态码:
GET /api/prometheus/silences

请求示例

GET /api/prometheus/silences HTTP/1.1
Host: example.com
状态码:

PrometheusNotifications

GET /api/prometheus/notifications

请求示例

GET /api/prometheus/notifications HTTP/1.1
Host: example.com
状态码:

RGW

GET /api/rgw/roles

列出 RGW 角色

请求示例

GET /api/rgw/roles HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/roles

创建 RGW 角色

请求示例

POST /api/rgw/roles HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "role_assume_policy_doc": "string",
    "role_name": "string",
    "role_path": "string"
}
状态码:
PUT /api/rgw/roles

编辑 RGW 角色

请求示例

PUT /api/rgw/roles HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "max_session_duration": "string",
    "role_name": "string"
}
状态码:
DELETE /api/rgw/roles/{role_name}

删除 RGW 角色

参数:
  • role_name (string) --

状态码:

RGW Topic Management

GET /api/rgw/topic

获取 RGW 主题列表

请求示例

GET /api/rgw/topic HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/topic

创建新的 RGW 主题

请求示例

POST /api/rgw/topic HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "ack_level": "string",
    "amqp_exchange": "string",
    "ca_location": "string",
    "cloud_events": "string",
    "daemon_name": "string",
    "kafka_brokers": "string",
    "max_retries": "string",
    "mechanism": "string",
    "name": "string",
    "opaque_data": "string",
    "owner": "string",
    "persistent": true,
    "policy": "string",
    "push_endpoint": "string",
    "retry_sleep_duration": "string",
    "time_to_live": "string",
    "use_ssl": true,
    "verify_ssl": true
}
状态码:
DELETE /api/rgw/topic/{key}

删除 RGW 主题

参数:
  • key (string) -- 用于检索主题的元数据对象键,例如 topic:topic_name

状态码:
GET /api/rgw/topic/{key}

获取 RGW 主题

参数:
  • key (string) -- 用于检索主题的元数据对象键,例如 owner:topic_name

请求示例

GET /api/rgw/topic/{key} HTTP/1.1
Host: example.com
状态码:

Rbd

GET /api/block/image

显示 Rbd 镜像

查询参数:
  • pool_name (string) -- 池名称

  • offset (integer) -- 偏移量

  • limit (integer) -- 限制

  • search (string) --

  • sort (string) --

请求示例

GET /api/block/image HTTP/1.1
Host: example.com
状态码:
POST /api/block/image

请求示例

POST /api/block/image HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "configuration": "string",
    "data_pool": "string",
    "features": "string",
    "metadata": "string",
    "mirror_mode": "string",
    "name": "string",
    "namespace": "string",
    "obj_size": 1,
    "pool_name": "string",
    "schedule_interval": "string",
    "size": 1,
    "stripe_count": 1,
    "stripe_unit": "string"
}
状态码:
GET /api/block/image/clone_format_version

返回 RBD 克隆格式版本。

请求示例

GET /api/block/image/clone_format_version HTTP/1.1
Host: example.com
状态码:
GET /api/block/image/default_features

请求示例

GET /api/block/image/default_features HTTP/1.1
Host: example.com
状态码:
DELETE /api/block/image/{image_spec}
参数:
  • image_spec (string) --

状态码:
GET /api/block/image/{image_spec}

获取 Rbd 镜像信息

参数:
  • image_spec (string) -- URL 编码的 “pool/rbd_name”。例如 “rbd%2Ffoo”

查询参数:
  • omit_usage (boolean) -- 为 true 时,不返回使用情况信息

请求示例

GET /api/block/image/{image_spec} HTTP/1.1
Host: example.com
状态码:
PUT /api/block/image/{image_spec}
参数:
  • image_spec (string) --

请求示例

PUT /api/block/image/{image_spec} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "configuration": "string",
    "enable_mirror": "string",
    "features": "string",
    "force": true,
    "image_mirror_mode": "string",
    "metadata": "string",
    "mirror_mode": "string",
    "name": "string",
    "primary": "string",
    "remove_scheduling": true,
    "resync": true,
    "schedule_interval": "string",
    "size": 1
}
状态码:
POST /api/block/image/{image_spec}/copy
参数:
  • image_spec (string) --

请求示例

POST /api/block/image/{image_spec}/copy HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "configuration": "string",
    "data_pool": "string",
    "dest_image_name": "string",
    "dest_namespace": "string",
    "dest_pool_name": "string",
    "features": "string",
    "metadata": "string",
    "obj_size": 1,
    "snapshot_name": "string",
    "stripe_count": 1,
    "stripe_unit": "string"
}
状态码:
POST /api/block/image/{image_spec}/flatten
参数:
  • image_spec (string) --

状态码:
POST /api/block/image/{image_spec}/move_trash
将镜像移动到回收站。

镜像,即使是被克隆正在 actively 使用的镜像,也可以被移动到回收站并在稍后删除。

参数:
  • image_spec (string) --

请求示例

POST /api/block/image/{image_spec}/move_trash HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "delay": 1
}
状态码:

RbdGroup

GET /api/block/pool/{pool_name}/group

按池名称列出组

参数:
  • pool_name (string) -- 池的名称

查询参数:
  • namespace (string) --

请求示例

GET /api/block/pool/{pool_name}/group HTTP/1.1
Host: example.com
状态码:
POST /api/block/pool/{pool_name}/group

创建一个组

参数:
  • pool_name (string) -- 池的名称

请求示例

POST /api/block/pool/{pool_name}/group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "name": "string",
    "namespace": "string"
}
状态码:
GET /api/block/pool/{pool_name}/group/{group_name}

获取组中的镜像列表

参数:
  • pool_name (string) -- 池的名称

  • group_name (string) -- 组的名称

查询参数:
  • namespace (string) --

请求示例

GET /api/block/pool/{pool_name}/group/{group_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/block/pool/{pool_name}/group/{group_name}

更新一个组

参数:
  • pool_name (string) -- 池的名称

  • group_name (string) -- 组的名称

请求示例

PUT /api/block/pool/{pool_name}/group/{group_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "namespace": "string",
    "new_name": "string"
}
状态码:
DELETE /api/block/pool/{pool_name}/group/{group_name}/image

从组中移除镜像

参数:
  • pool_name (string) -- 池的名称

  • group_name (string) -- 组的名称

查询参数:
  • image_name (string) -- 镜像的名称 (必需)

  • namespace (string) --

状态码:
POST /api/block/pool/{pool_name}/group/{group_name}/image

向组中添加镜像

参数:
  • pool_name (string) -- 池的名称

  • group_name (string) -- 组的名称

请求示例

POST /api/block/pool/{pool_name}/group/{group_name}/image HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "image_name": "string",
    "namespace": "string"
}
状态码:

RbdMirroring

GET /api/block/mirroring/site_name

显示 Rbd 镜像站点名称

请求示例

GET /api/block/mirroring/site_name HTTP/1.1
Host: example.com
状态码:
PUT /api/block/mirroring/site_name

请求示例

PUT /api/block/mirroring/site_name HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "site_name": "string"
}
状态码:

RbdMirroringPoolBootstrap

POST /api/block/mirroring/pool/{pool_name}/bootstrap/peer
参数:
  • pool_name (string) --

请求示例

POST /api/block/mirroring/pool/{pool_name}/bootstrap/peer HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "direction": "string",
    "token": "string"
}
状态码:
POST /api/block/mirroring/pool/{pool_name}/bootstrap/token
参数:
  • pool_name (string) --

状态码:

RbdMirroringPoolMode

GET /api/block/mirroring/pool/{pool_name}

显示 Rbd 镜像摘要

参数:
  • pool_name (string) -- 池名称

请求示例

GET /api/block/mirroring/pool/{pool_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/block/mirroring/pool/{pool_name}
参数:
  • pool_name (string) --

请求示例

PUT /api/block/mirroring/pool/{pool_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "mirror_mode": "string"
}
状态码:

RbdMirroringPoolPeer

GET /api/block/mirroring/pool/{pool_name}/peer
参数:
  • pool_name (string) --

请求示例

GET /api/block/mirroring/pool/{pool_name}/peer HTTP/1.1
Host: example.com
状态码:
POST /api/block/mirroring/pool/{pool_name}/peer
参数:
  • pool_name (string) --

请求示例

POST /api/block/mirroring/pool/{pool_name}/peer HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "client_id": "string",
    "cluster_name": "string",
    "key": "string",
    "mon_host": "string"
}
状态码:
DELETE /api/block/mirroring/pool/{pool_name}/peer/{peer_uuid}
参数:
  • pool_name (string) --

  • peer_uuid (string) --

状态码:
GET /api/block/mirroring/pool/{pool_name}/peer/{peer_uuid}
参数:
  • pool_name (string) --

  • peer_uuid (string) --

请求示例

GET /api/block/mirroring/pool/{pool_name}/peer/{peer_uuid} HTTP/1.1
Host: example.com
状态码:
PUT /api/block/mirroring/pool/{pool_name}/peer/{peer_uuid}
参数:
  • pool_name (string) --

  • peer_uuid (string) --

请求示例

PUT /api/block/mirroring/pool/{pool_name}/peer/{peer_uuid} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "client_id": "string",
    "cluster_name": "string",
    "key": "string",
    "mon_host": "string"
}
状态码:

RbdMirroringSummary

GET /api/block/mirroring/summary

显示 Rbd 镜像摘要

请求示例

GET /api/block/mirroring/summary HTTP/1.1
Host: example.com
状态码:
GET /api/block/mirroring/{pool_name}/{image_name}/summary
参数:
  • pool_name (string) --

  • image_name (string) --

请求示例

GET /api/block/mirroring/{pool_name}/{image_name}/summary HTTP/1.1
Host: example.com
状态码:

RbdNamespace

GET /api/block/pool/{pool_name}/namespace
参数:
  • pool_name (string) --

请求示例

GET /api/block/pool/{pool_name}/namespace HTTP/1.1
Host: example.com
状态码:
POST /api/block/pool/{pool_name}/namespace
参数:
  • pool_name (string) --

请求示例

POST /api/block/pool/{pool_name}/namespace HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "namespace": "string"
}
状态码:
DELETE /api/block/pool/{pool_name}/namespace/{namespace}
参数:
  • pool_name (string) --

  • namespace (string) --

状态码:

RbdSnapshot

POST /api/block/image/{image_spec}/snap
参数:
  • image_spec (string) --

请求示例

POST /api/block/image/{image_spec}/snap HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "mirrorImageSnapshot": "string",
    "snapshot_name": "string"
}
状态码:
DELETE /api/block/image/{image_spec}/snap/{snapshot_name}
参数:
  • image_spec (string) --

  • snapshot_name (string) --

状态码:
PUT /api/block/image/{image_spec}/snap/{snapshot_name}
参数:
  • image_spec (string) --

  • snapshot_name (string) --

请求示例

PUT /api/block/image/{image_spec}/snap/{snapshot_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "is_protected": true,
    "new_snap_name": "string"
}
状态码:
POST /api/block/image/{image_spec}/snap/{snapshot_name}/clone

将快照克隆为镜像

参数:
  • image_spec (string) --

  • snapshot_name (string) --

请求示例

POST /api/block/image/{image_spec}/snap/{snapshot_name}/clone HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "child_image_name": "string",
    "child_namespace": "string",
    "child_pool_name": "string",
    "configuration": "string",
    "data_pool": "string",
    "features": "string",
    "metadata": "string",
    "obj_size": 1,
    "stripe_count": 1,
    "stripe_unit": "string"
}
状态码:
POST /api/block/image/{image_spec}/snap/{snapshot_name}/rollback
参数:
  • image_spec (string) --

  • snapshot_name (string) --

状态码:

RbdTrash

GET /api/block/image/trash

按池名称获取 RBD 回收站详细信息

列出垃圾箱中的所有条目。

查询参数:
  • pool_name (string) -- 池的名称

请求示例

GET /api/block/image/trash HTTP/1.1
Host: example.com
状态码:
POST /api/block/image/trash/purge

从回收站中删除所有过期的镜像。

查询参数:
  • pool_name (string) --

请求示例

POST /api/block/image/trash/purge HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "pool_name": "string"
}
状态码:
DELETE /api/block/image/trash/{image_id_spec}
从回收站删除镜像。

如果镜像的延迟删除时间未过期,则不能删除它,除非使用 force。但正在被克隆 actively 使用或有快照的镜像不能被删除。

参数:
  • image_id_spec (string) --

查询参数:
  • force (boolean) --

状态码:
POST /api/block/image/trash/{image_id_spec}/restore

从回收站恢复镜像。

参数:
  • image_id_spec (string) --

请求示例

POST /api/block/image/trash/{image_id_spec}/restore HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "new_image_name": "string"
}
状态码:

Report

GET /api/feedback

列出所有问题详细信息。

请求示例

GET /api/feedback HTTP/1.1
Host: example.com
状态码:
POST /api/feedback

创建一个问题。:param project: 受影响的 ceph 组件。:param tracker: 跟踪器类型。:param subject: 问题的标题。:param description: 问题的描述。:param api_key: Ceph 跟踪器 api key。

请求示例

POST /api/feedback HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "api_key": "string",
    "description": "string",
    "project": "string",
    "subject": "string",
    "tracker": "string"
}
状态码:
DELETE /api/feedback/api_key

删除 Ceph 跟踪器 API 密钥。

状态码:
GET /api/feedback/api_key

返回 Ceph 跟踪器 API 密钥。

请求示例

GET /api/feedback/api_key HTTP/1.1
Host: example.com
状态码:
POST /api/feedback/api_key

设置 Ceph 跟踪器 API 密钥。:param api_key: Ceph 跟踪器 API 密钥。

请求示例

POST /api/feedback/api_key HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "api_key": "string"
}
状态码:

RgwBucket

GET /api/rgw/bucket
查询参数:
  • stats (boolean) --

  • daemon_name (string) --

  • uid (string) --

请求示例

GET /api/rgw/bucket HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/bucket

请求示例

POST /api/rgw/bucket HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket": "string",
    "bucket_policy": "string",
    "canned_acl": "string",
    "daemon_name": "string",
    "encryption_state": "string",
    "encryption_type": "string",
    "key_id": "string",
    "lock_enabled": "string",
    "lock_mode": "string",
    "lock_retention_period_days": "string",
    "lock_retention_period_years": "string",
    "placement_target": "string",
    "replication": "string",
    "tags": "string",
    "uid": "string",
    "zonegroup": "string"
}
状态码:
DELETE /api/rgw/bucket/deleteEncryption
查询参数:
  • bucket_name (string) -- (必需)

  • daemon_name (string) --

  • owner (string) --

状态码:
GET /api/rgw/bucket/getEncryption
查询参数:
  • bucket_name (string) -- (必需)

  • daemon_name (string) --

  • owner (string) --

请求示例

GET /api/rgw/bucket/getEncryption?bucket_name=string HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/bucket/getEncryptionConfig
查询参数:
  • daemon_name (string) --

  • owner (string) --

请求示例

GET /api/rgw/bucket/getEncryptionConfig HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/bucket/lifecycle
查询参数:
  • bucket_name (string) --

  • daemon_name (string) --

  • owner (string) --

  • tenant (string) --

请求示例

GET /api/rgw/bucket/lifecycle HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/bucket/lifecycle

请求示例

PUT /api/rgw/bucket/lifecycle HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_name": "string",
    "daemon_name": "string",
    "lifecycle": "string",
    "owner": "string",
    "tenant": "string"
}
状态码:
DELETE /api/rgw/bucket/notification

删除桶通知

查询参数:
  • bucket_name (string) -- (必需)

  • notification_id (string) -- (必需)

  • daemon_name (string) --

  • owner (string) --

状态码:
GET /api/rgw/bucket/notification

获取桶通知

查询参数:
  • bucket_name (string) -- (必需)

  • daemon_name (string) --

  • owner (string) --

请求示例

GET /api/rgw/bucket/notification?bucket_name=string HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/bucket/notification

创建或更新桶通知

请求示例

PUT /api/rgw/bucket/notification HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_name": "string",
    "daemon_name": "string",
    "notification": "string",
    "owner": "string"
}
状态码:
GET /api/rgw/bucket/ratelimit

获取桶全局速率限制

请求示例

GET /api/rgw/bucket/ratelimit HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/bucket/setEncryptionConfig

请求示例

PUT /api/rgw/bucket/setEncryptionConfig HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "config": "string",
    "daemon_name": "string",
    "encryption_type": "string",
    "kms_provider": "string"
}
状态码:
DELETE /api/rgw/bucket/{bucket}
参数:
  • bucket (string) --

查询参数:
  • daemon_name (string) --

状态码:
GET /api/rgw/bucket/{bucket}
参数:
  • bucket (string) --

查询参数:
  • daemon_name (string) --

请求示例

GET /api/rgw/bucket/{bucket} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/bucket/{bucket}
参数:
  • bucket (string) --

请求示例

PUT /api/rgw/bucket/{bucket} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_id": "string",
    "bucket_policy": "string",
    "canned_acl": "string",
    "daemon_name": "string",
    "encryption_state": "string",
    "encryption_type": "string",
    "key_id": "string",
    "lifecycle": "string",
    "lock_mode": "string",
    "lock_retention_period_days": "string",
    "lock_retention_period_years": "string",
    "mfa_delete": "string",
    "mfa_token_pin": "string",
    "mfa_token_serial": "string",
    "replication": "string",
    "tags": "string",
    "uid": "string",
    "versioning_state": "string"
}
状态码:
GET /api/rgw/bucket/{uid}/ratelimit

获取桶速率限制

参数:
  • uid (string) --

请求示例

GET /api/rgw/bucket/{uid}/ratelimit HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/bucket/{uid}/ratelimit

更新桶速率限制

参数:
  • uid (string) --

请求示例

PUT /api/rgw/bucket/{uid}/ratelimit HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "enabled": "string",
    "max_read_bytes": "string",
    "max_read_ops": "string",
    "max_write_bytes": "string",
    "max_write_ops": "string"
}
状态码:

RgwDaemon

GET /api/rgw/daemon

显示 RGW 守护程序

请求示例

GET /api/rgw/daemon HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/daemon/set_multisite_config

请求示例

PUT /api/rgw/daemon/set_multisite_config HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "daemon_name": "string",
    "realm_name": "string",
    "zone_name": "string",
    "zonegroup_name": "string"
}
状态码:
GET /api/rgw/daemon/{svc_id}
参数:
  • svc_id (string) --

请求示例

GET /api/rgw/daemon/{svc_id} HTTP/1.1
Host: example.com
状态码:

RgwMirrorPerfCounter

GET /api/perf_counters/rbd-mirror/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/rbd-mirror/{service_id} HTTP/1.1
Host: example.com
状态码:

RgwMultisite

PUT /api/rgw/multisite/sync-flow

创建或更新同步流

请求示例

PUT /api/rgw/multisite/sync-flow HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_name": "string",
    "destination_zone": "string",
    "flow_id": "string",
    "flow_type": "string",
    "group_id": "string",
    "source_zone": "string",
    "zones": "string"
}
状态码:
DELETE /api/rgw/multisite/sync-flow/{flow_id}/{flow_type}/{group_id}

移除同步流

参数:
  • flow_id (string) --

  • flow_type (string) --

  • group_id (string) --

查询参数:
  • source_zone (string) --

  • destination_zone (string) --

  • zones (string) --

  • bucket_name (string) --

状态码:
PUT /api/rgw/multisite/sync-pipe

创建或更新同步管道

请求示例

PUT /api/rgw/multisite/sync-pipe HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_name": "string",
    "destination_bucket": "string",
    "destination_zones": "string",
    "group_id": "string",
    "mode": "string",
    "pipe_id": "string",
    "source_bucket": "string",
    "source_zones": "string",
    "user": "string"
}
状态码:
DELETE /api/rgw/multisite/sync-pipe/{group_id}/{pipe_id}

移除同步管道

参数:
  • group_id (string) --

  • pipe_id (string) --

查询参数:
  • source_zones (string) --

  • destination_zones (string) --

  • bucket_name (string) --

状态码:
GET /api/rgw/multisite/sync-policy

获取同步策略

查询参数:
  • bucket_name (string) --

  • zonegroup_name (string) --

  • all_policy (string) --

请求示例

GET /api/rgw/multisite/sync-policy HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/multisite/sync-policy-group

创建同步策略组

请求示例

POST /api/rgw/multisite/sync-policy-group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_name": "string",
    "group_id": "string",
    "status": "string"
}
状态码:
PUT /api/rgw/multisite/sync-policy-group

更新同步策略组

请求示例

PUT /api/rgw/multisite/sync-policy-group HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "bucket_name": "string",
    "group_id": "string",
    "status": "string"
}
状态码:
DELETE /api/rgw/multisite/sync-policy-group/{group_id}

移除同步策略组

参数:
  • group_id (string) --

查询参数:
  • bucket_name (string) --

状态码:
GET /api/rgw/multisite/sync-policy-group/{group_id}

获取同步策略组

参数:
  • group_id (string) --

查询参数:
  • bucket_name (string) --

请求示例

GET /api/rgw/multisite/sync-policy-group/{group_id} HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/multisite/sync_status

获取同步状态

查询参数:
  • daemon_name (string) --

请求示例

GET /api/rgw/multisite/sync_status HTTP/1.1
Host: example.com
状态码:

RgwPerfCounter

GET /api/perf_counters/rgw/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/rgw/{service_id} HTTP/1.1
Host: example.com
状态码:

RgwRealm

GET /api/rgw/realm
查询参数:
  • replicable (string) --

请求示例

GET /api/rgw/realm HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/realm

请求示例

POST /api/rgw/realm HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "default": "string",
    "realm_name": "string"
}
状态码:
GET /api/rgw/realm/get_all_realms_info

请求示例

GET /api/rgw/realm/get_all_realms_info HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/realm/get_realm_tokens

请求示例

GET /api/rgw/realm/get_realm_tokens HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/realm/import_realm_token

请求示例

POST /api/rgw/realm/import_realm_token HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "placement_spec": "string",
    "port": "string",
    "realm_token": "string",
    "zone_name": "string"
}
状态码:
DELETE /api/rgw/realm/{realm_name}
参数:
  • realm_name (string) --

状态码:
GET /api/rgw/realm/{realm_name}
参数:
  • realm_name (string) --

请求示例

GET /api/rgw/realm/{realm_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/realm/{realm_name}
参数:
  • realm_name (string) --

请求示例

PUT /api/rgw/realm/{realm_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "default": "string",
    "new_realm_name": "string"
}
状态码:

RgwSite

GET /api/rgw/site
查询参数:
  • query (string) --

  • daemon_name (string) --

请求示例

GET /api/rgw/site HTTP/1.1
Host: example.com
状态码:

RgwUser

GET /api/rgw/user

显示 RGW 用户

查询参数:
  • daemon_name (string) --

  • detailed (boolean) -- 如果为 true,返回每个用户的完整用户详细信息。如果为 false,仅返回用户名列表。

请求示例

GET /api/rgw/user HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/user

创建一个新的 RGW 用户。

请求示例

POST /api/rgw/user HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access_key": "string",
    "account_id": 1,
    "account_policies": 1,
    "account_root_user": 1,
    "daemon_name": "string",
    "display_name": "string",
    "email": "string",
    "generate_key": "string",
    "max_buckets": "string",
    "secret_key": "string",
    "suspended": "string",
    "system": "string",
    "uid": "string"
}
状态码:
GET /api/rgw/user/get_emails
查询参数:
  • daemon_name (string) --

请求示例

GET /api/rgw/user/get_emails HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/user/ratelimit

获取用户全局速率限制

请求示例

GET /api/rgw/user/ratelimit HTTP/1.1
Host: example.com
状态码:
DELETE /api/rgw/user/{uid}
参数:
  • uid (string) --

查询参数:
  • daemon_name (string) --

状态码:
GET /api/rgw/user/{uid}
参数:
  • uid (string) --

查询参数:
  • daemon_name (string) --

  • stats (boolean) --

请求示例

GET /api/rgw/user/{uid} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/user/{uid}

更新一个现有的 RGW 用户。

参数:
  • uid (string) --

请求示例

PUT /api/rgw/user/{uid} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "account_id": 1,
    "account_policies": 1,
    "account_root_user": 1,
    "daemon_name": "string",
    "display_name": "string",
    "email": "string",
    "max_buckets": "string",
    "suspended": "string",
    "system": "string"
}
状态码:
DELETE /api/rgw/user/{uid}/capability
参数:
  • uid (string) --

查询参数:
  • type (string) -- (必需)

  • perm (string) -- (必需)

  • daemon_name (string) --

状态码:
POST /api/rgw/user/{uid}/capability
参数:
  • uid (string) --

请求示例

POST /api/rgw/user/{uid}/capability HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "daemon_name": "string",
    "perm": "string",
    "type": "string"
}
状态码:
DELETE /api/rgw/user/{uid}/key
参数:
  • uid (string) --

查询参数:
  • key_type (string) --

  • subuser (string) --

  • access_key (string) --

  • daemon_name (string) --

状态码:
POST /api/rgw/user/{uid}/key
参数:
  • uid (string) --

请求示例

POST /api/rgw/user/{uid}/key HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access_key": "string",
    "daemon_name": "string",
    "generate_key": "string",
    "key_type": "string",
    "secret_key": "string",
    "subuser": "string"
}
状态码:
GET /api/rgw/user/{uid}/quota
参数:
  • uid (string) --

查询参数:
  • daemon_name (string) --

请求示例

GET /api/rgw/user/{uid}/quota HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/user/{uid}/quota
参数:
  • uid (string) --

请求示例

PUT /api/rgw/user/{uid}/quota HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "daemon_name": "string",
    "enabled": "string",
    "max_objects": "string",
    "max_size_kb": 1,
    "quota_type": "string"
}
状态码:
GET /api/rgw/user/{uid}/ratelimit

获取用户速率限制

参数:
  • uid (string) --

请求示例

GET /api/rgw/user/{uid}/ratelimit HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/user/{uid}/ratelimit

更新用户速率限制

参数:
  • uid (string) --

请求示例

PUT /api/rgw/user/{uid}/ratelimit HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "enabled": true,
    "max_read_bytes": 1,
    "max_read_ops": 1,
    "max_write_bytes": 1,
    "max_write_ops": 1
}
状态码:
POST /api/rgw/user/{uid}/subuser
参数:
  • uid (string) --

请求示例

POST /api/rgw/user/{uid}/subuser HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access": "string",
    "access_key": "string",
    "daemon_name": "string",
    "generate_secret": "string",
    "key_type": "string",
    "secret_key": "string",
    "subuser": "string"
}
状态码:
DELETE /api/rgw/user/{uid}/subuser/{subuser}
param purge_keys:

设置为 False 不清除密钥。注意,这只适用于 s3 子用户。

参数:
  • uid (string) --

  • subuser (string) --

查询参数:
  • purge_keys (string) --

  • daemon_name (string) --

状态码:

RgwUserAccounts

GET /api/rgw/accounts

根据 'detailed' 查询参数列出所有账户 ID 或所有详细账户信息。

  • 如果 detailed=True,返回详细账户信息。

  • 如果 detailed=False,仅返回账户 ID。

查询参数:
  • daemon_name (string) --

  • detailed (boolean) --

请求示例

GET /api/rgw/accounts HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/accounts

更新 RGW 账户信息

创建一个账户

param account_name:

账户名称

return:

返回账户资源。

rtype:

Dict[str, Any]

请求示例

POST /api/rgw/accounts HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "account_name": "string",
    "daemon_name": "string",
    "email": "string",
    "max_access_keys": 1,
    "max_buckets": 1,
    "max_group": 1,
    "max_roles": 1,
    "max_users": 1,
    "tenant": "string"
}
状态码:
DELETE /api/rgw/accounts/{account_id}

删除 RGW 账户

移除一个账户

param account_id:

账户标识符

return:

None.

参数:
  • account_id (string) -- 账户 ID

查询参数:
  • daemon_name (string) -- 守护程序名称

状态码:
GET /api/rgw/accounts/{account_id}

按 ID 获取 RGW 账户

按账户 ID 获取账户

参数:
  • account_id (string) -- 账户 ID

查询参数:
  • daemon_name (string) -- 守护程序名称

请求示例

GET /api/rgw/accounts/{account_id} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/accounts/{account_id}

更新 RGW 账户信息

修改一个账户

param account_id:

账户标识符

return:

返回修改后的账户资源。

rtype:

Dict[str, Any]

参数:
  • account_id (string) -- 账户 ID

请求示例

PUT /api/rgw/accounts/{account_id} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "account_name": "string",
    "daemon_name": "string",
    "email": "string",
    "max_access_keys": 1,
    "max_buckets": 1,
    "max_group": 1,
    "max_roles": 1,
    "max_users": 1,
    "tenant": "string"
}
状态码:
PUT /api/rgw/accounts/{account_id}/quota

设置 RGW 账户/桶配额

修改配额

param account_id:

账户标识符

param quota_type:

‘account’ 或 ‘bucket’

return:

返回修改后的配额。

rtype:

Dict[str, Any]

参数:
  • account_id (string) -- 账户 ID

请求示例

PUT /api/rgw/accounts/{account_id}/quota HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "enabled": "string",
    "max_objects": "string",
    "max_size": "string",
    "quota_type": "string"
}
状态码:
PUT /api/rgw/accounts/{account_id}/quota/status

启用/禁用 RGW 账户/桶配额

启用/禁用配额

param account_id:

账户标识符

param quota_type:

‘account’ 或 ‘bucket’

param quota_status:

‘enable’ 或 ‘disable’

return:

返回修改后的配额。

rtype:

Dict[str, Any]

参数:
  • account_id (string) -- 账户 ID

请求示例

PUT /api/rgw/accounts/{account_id}/quota/status HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "quota_status": "string",
    "quota_type": "string"
}
状态码:

RgwZone

GET /api/rgw/zone

请求示例

GET /api/rgw/zone HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/zone

请求示例

POST /api/rgw/zone HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access_key": "string",
    "default": true,
    "master": true,
    "secret_key": "string",
    "zone_endpoints": "string",
    "zone_name": "string",
    "zonegroup_name": "string"
}
状态码:
PUT /api/rgw/zone/create_system_user

请求示例

PUT /api/rgw/zone/create_system_user HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "userName": "string",
    "zoneName": "string"
}
状态码:
GET /api/rgw/zone/get_all_zones_info

请求示例

GET /api/rgw/zone/get_all_zones_info HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/zone/get_pool_names

请求示例

GET /api/rgw/zone/get_pool_names HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/zone/get_user_list
查询参数:
  • zoneName (string) --

  • realmName (string) --

请求示例

GET /api/rgw/zone/get_user_list HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/zone/storage-class

请求示例

POST /api/rgw/zone/storage-class HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "compression": "string",
    "data_pool": "string",
    "placement_target": "string",
    "storage_class": "string",
    "zone_name": "string"
}
状态码:
PUT /api/rgw/zone/storage-class

请求示例

PUT /api/rgw/zone/storage-class HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "compression": "string",
    "data_pool": "string",
    "placement_target": "string",
    "storage_class": "string",
    "zone_name": "string"
}
状态码:
DELETE /api/rgw/zone/{zone_name}
参数:
  • zone_name (string) --

查询参数:
  • delete_pools (string) -- (必需)

  • pools (string) --

  • zonegroup_name (string) --

  • realm_name (string) --

状态码:
GET /api/rgw/zone/{zone_name}
参数:
  • zone_name (string) --

请求示例

GET /api/rgw/zone/{zone_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/zone/{zone_name}
参数:
  • zone_name (string) --

请求示例

PUT /api/rgw/zone/{zone_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "access_key": "string",
    "compression": "string",
    "data_extra_pool": "string",
    "data_pool": "string",
    "data_pool_class": "string",
    "default": "string",
    "index_pool": "string",
    "master": "string",
    "new_zone_name": "string",
    "placement_target": "string",
    "secret_key": "string",
    "storage_class": "string",
    "zone_endpoints": "string",
    "zonegroup_name": "string"
}
状态码:

RgwZonegroup

GET /api/rgw/zonegroup

请求示例

GET /api/rgw/zonegroup HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/zonegroup

请求示例

POST /api/rgw/zonegroup HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "default": "string",
    "master": "string",
    "realm_name": "string",
    "zonegroup_endpoints": "string",
    "zonegroup_name": "string"
}
状态码:
GET /api/rgw/zonegroup/get_all_zonegroups_info

请求示例

GET /api/rgw/zonegroup/get_all_zonegroups_info HTTP/1.1
Host: example.com
状态码:
GET /api/rgw/zonegroup/get_placement_target_by_placement_id/{placement_id}
参数:
  • placement_id (string) --

请求示例

GET /api/rgw/zonegroup/get_placement_target_by_placement_id/{placement_id} HTTP/1.1
Host: example.com
状态码:
POST /api/rgw/zonegroup/storage-class

请求示例

POST /api/rgw/zonegroup/storage-class HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "placement_targets": "string",
    "zone_group": "string"
}
状态码:
PUT /api/rgw/zonegroup/storage-class

请求示例

PUT /api/rgw/zonegroup/storage-class HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "placement_targets": "string",
    "zone_group": "string"
}
状态码:
DELETE /api/rgw/zonegroup/storage-class/{placement_id}/{storage_class}
参数:
  • placement_id (string) --

  • storage_class (string) --

状态码:
DELETE /api/rgw/zonegroup/{zonegroup_name}
参数:
  • zonegroup_name (string) --

查询参数:
  • delete_pools (string) -- (必需)

  • pools (string) --

  • realm_name (string) --

状态码:
GET /api/rgw/zonegroup/{zonegroup_name}
参数:
  • zonegroup_name (string) --

请求示例

GET /api/rgw/zonegroup/{zonegroup_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/zonegroup/{zonegroup_name}
参数:
  • zonegroup_name (string) --

请求示例

PUT /api/rgw/zonegroup/{zonegroup_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "add_zones": "string",
    "default": "string",
    "master": "string",
    "new_zonegroup_name": "string",
    "placement_targets": "string",
    "realm_name": "string",
    "remove_zones": "string",
    "zonegroup_endpoints": "string"
}
状态码:

Role

GET /api/role

显示角色列表

请求示例

GET /api/role HTTP/1.1
Host: example.com
状态码:
POST /api/role

请求示例

POST /api/role HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "description": "string",
    "name": "string",
    "scopes_permissions": "string"
}
状态码:
DELETE /api/role/{name}
参数:
  • name (string) --

状态码:
GET /api/role/{name}
参数:
  • name (string) --

请求示例

GET /api/role/{name} HTTP/1.1
Host: example.com
状态码:
PUT /api/role/{name}
参数:
  • name (string) --

请求示例

PUT /api/role/{name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "description": "string",
    "scopes_permissions": "string"
}
状态码:
POST /api/role/{name}/clone
参数:
  • name (string) --

请求示例

POST /api/role/{name}/clone HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "new_name": "string"
}
状态码:

SMB

GET /api/smb/cluster

列出 smb 集群

列出 smb 集群

请求示例

GET /api/smb/cluster HTTP/1.1
Host: example.com
状态码:
POST /api/smb/cluster

创建 smb 集群

创建一个 smb 集群

param cluster_resource:

Dict 集群数据

return:

返回集群资源。

rtype:

Dict[str, Any]

请求示例

POST /api/smb/cluster HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "cluster_resource": "string"
}
状态码:
DELETE /api/smb/cluster/{cluster_id}

移除一个 smb 集群

移除一个 smb 集群

param cluster_id:

集群标识符

return:

None.

参数:
  • cluster_id (string) -- 集群的唯一标识符

状态码:
GET /api/smb/cluster/{cluster_id}

获取一个 smb 集群

按集群 ID 获取 smb 集群

参数:
  • cluster_id (string) -- 集群的唯一标识符

请求示例

GET /api/smb/cluster/{cluster_id} HTTP/1.1
Host: example.com
状态码:
GET /api/smb/joinauth

列出 smb 加入授权资源

列出所有 smb 加入授权资源

return:

返回加入授权列表。

rtype:

List[Dict]

请求示例

GET /api/smb/joinauth HTTP/1.1
Host: example.com
状态码:
POST /api/smb/joinauth

创建 smb 加入授权

创建 smb 加入授权资源

return:

返回加入授权资源。

rtype:

Dict

请求示例

POST /api/smb/joinauth HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "join_auth": "string"
}
状态码:
DELETE /api/smb/joinauth/{auth_id}

删除 smb 加入授权

删除 smb 加入授权资源

param auth_id:

加入授权标识符

return:

None.

参数:
  • auth_id (string) -- auth_id

状态码:
GET /api/smb/joinauth/{auth_id}

获取 smb 加入授权资源

获取加入授权资源

return:

返回加入授权。

rtype:

Dict

参数:
  • auth_id (string) --

请求示例

GET /api/smb/joinauth/{auth_id} HTTP/1.1
Host: example.com
状态码:
GET /api/smb/share

列出 smb 共享

列出所有 smb 共享或给定集群的所有共享

param cluster_id:

包含集群信息的 Dict

return:

返回共享列表。

rtype:

List[Dict]

查询参数:
  • cluster_id (string) -- 集群的唯一标识符

请求示例

GET /api/smb/share HTTP/1.1
Host: example.com
状态码:
POST /api/smb/share

创建 smb 共享

创建一个 smb 共享

param share_resource:

Dict 共享数据

return:

返回共享资源。

rtype:

Dict[str, Any]

请求示例

POST /api/smb/share HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "share_resource": "string"
}
状态码:
DELETE /api/smb/share/{cluster_id}/{share_id}

移除 smb 共享

从给定集群中移除 smb 共享

param cluster_id:

集群标识符

param share_id:

共享标识符

return:

None.

参数:
  • cluster_id (string) -- 集群的唯一标识符

  • share_id (string) -- 共享的唯一标识符

状态码:
GET /api/smb/share/{cluster_id}/{share_id}

获取 smb 共享

按集群和共享 ID 获取 smb 共享

参数:
  • cluster_id (string) -- 集群的唯一标识符

  • share_id (string) -- 共享的唯一标识符

请求示例

GET /api/smb/share/{cluster_id}/{share_id} HTTP/1.1
Host: example.com
状态码:
GET /api/smb/usersgroups

列出 smb 用户资源

列出所有 smb 用户组资源

return:

返回用户组列表

rtype:

List[Dict]

请求示例

GET /api/smb/usersgroups HTTP/1.1
Host: example.com
状态码:
POST /api/smb/usersgroups

创建 smb 用户组

创建 smb 用户组资源

return:

返回用户组资源。

rtype:

Dict

请求示例

POST /api/smb/usersgroups HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "usersgroups": "string"
}
状态码:
DELETE /api/smb/usersgroups/{users_groups_id}

删除 smb 加入授权

删除 smb 用户组资源

param users_group_id:

用户标识符

return:

None.

参数:
  • users_groups_id (string) -- users_groups_id

状态码:
GET /api/smb/usersgroups/{users_groups_id}

获取 smb 用户组授权资源

获取用户和组资源

return:

返回加入授权。

rtype:

Dict

参数:
  • users_groups_id (string) --

请求示例

GET /api/smb/usersgroups/{users_groups_id} HTTP/1.1
Host: example.com
状态码:

Service

GET /api/service
查询参数:
  • service_name (string) --

  • offset (integer) --

  • limit (integer) --

  • search (string) --

  • sort (string) --

请求示例

GET /api/service HTTP/1.1
Host: example.com
状态码:
POST /api/service
param service_spec:

服务规范,为 JSON 格式。

param service_name:

服务名称,例如 ‘alertmanager’。

return:

None

请求示例

POST /api/service HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "service_name": "string",
    "service_spec": "string"
}
状态码:
GET /api/service/known_types

获取已知服务类型列表,例如 ‘alertmanager’、‘node-exporter’、‘osd’ 或 ‘rgw’。

请求示例

GET /api/service/known_types HTTP/1.1
Host: example.com
状态码:
DELETE /api/service/{service_name}
param service_name:

服务名称,例如 ‘mds’ 或 ‘crash.foo’。

return:

None

参数:
  • service_name (string) --

状态码:
GET /api/service/{service_name}
参数:
  • service_name (string) --

请求示例

GET /api/service/{service_name} HTTP/1.1
Host: example.com
状态码:
PUT /api/service/{service_name}
param service_spec:

服务规范,为 JSON 格式。

param service_name:

服务名称,例如 ‘alertmanager’。

return:

None

参数:
  • service_name (string) --

请求示例

PUT /api/service/{service_name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "service_spec": "string"
}
状态码:
GET /api/service/{service_name}/daemons
参数:
  • service_name (string) --

请求示例

GET /api/service/{service_name}/daemons HTTP/1.1
Host: example.com
状态码:

Settings

GET /api/settings

显示设置信息

获取可用选项列表。:param names: 一个逗号分隔的选项名称列表,应予处理。默认为 None。:type names: None|str:return: 可用选项列表。:rtype: list[dict]

查询参数:
  • names (string) -- 设置名称

请求示例

GET /api/settings HTTP/1.1
Host: example.com
状态码:
PUT /api/settings
状态码:
DELETE /api/settings/{name}
参数:
  • name (string) --

状态码:
GET /api/settings/{name}

获取给定选项。:param name: 选项的名称。:return: 返回包含给定选项的名称、类型、默认值和当前值的字典。:rtype: dict

参数:
  • name (string) --

请求示例

GET /api/settings/{name} HTTP/1.1
Host: example.com
状态码:
PUT /api/settings/{name}
参数:
  • name (string) --

请求示例

PUT /api/settings/{name} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "value": "string"
}
状态码:

总结

GET /api/summary

显示摘要

请求示例

GET /api/summary HTTP/1.1
Host: example.com
状态码:

Task

GET /api/task

显示任务

查询参数:
  • name (string) -- 任务名称

请求示例

GET /api/task HTTP/1.1
Host: example.com
状态码:

TcmuRunnerPerfCounter

GET /api/perf_counters/tcmu-runner/{service_id}
参数:
  • service_id (string) --

请求示例

GET /api/perf_counters/tcmu-runner/{service_id} HTTP/1.1
Host: example.com
状态码:

遥测

PUT /api/telemetry

启用或禁用发送由 Telemetry 模块收集的数据。:param enable: 启用或禁用发送数据:type enable: bool:param license_name: 许可证字符串,例如 ‘sharing-1-0’,以确保用户了解并接受共享 Telemetry 数据的许可证。:type license_name: string

请求示例

PUT /api/telemetry HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "enable": true,
    "license_name": "string"
}
状态码:
GET /api/telemetry/report

获取详细 Telemetry 报告

获取 Ceph 和设备报告数据:return: Ceph 和设备报告数据:rtype: dict

请求示例

GET /api/telemetry/report HTTP/1.1
Host: example.com
状态码:

Upgrade

GET /api/cluster/upgrade

获取可用于升级的版本

查询参数:
  • tags (boolean) -- 显示所有镜像标签

  • image (string) -- Ceph 镜像

  • show_all_versions (boolean) -- 显示所有可用版本

请求示例

GET /api/cluster/upgrade HTTP/1.1
Host: example.com
状态码:
PUT /api/cluster/upgrade/pause

暂停集群升级

状态码:
PUT /api/cluster/upgrade/resume

恢复集群升级

状态码:
POST /api/cluster/upgrade/start

开始集群升级

请求示例

POST /api/cluster/upgrade/start HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "daemon_types": "string",
    "host_placement": "string",
    "image": "string",
    "limit": "string",
    "services": "string",
    "version": "string"
}
状态码:
GET /api/cluster/upgrade/status

获取集群升级状态

请求示例

GET /api/cluster/upgrade/status HTTP/1.1
Host: example.com
状态码:
PUT /api/cluster/upgrade/stop

停止集群升级

状态码:

用户

GET /api/user

获取用户列表

请求示例

GET /api/user HTTP/1.1
Host: example.com
状态码:
POST /api/user

请求示例

POST /api/user HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "email": "string",
    "enabled": true,
    "name": "string",
    "password": "string",
    "pwdExpirationDate": "string",
    "pwdUpdateRequired": true,
    "roles": "string",
    "username": "string"
}
状态码:
DELETE /api/user/{username}
参数:
  • username (string) --

状态码:
GET /api/user/{username}
参数:
  • username (string) --

请求示例

GET /api/user/{username} HTTP/1.1
Host: example.com
状态码:
PUT /api/user/{username}
参数:
  • username (string) --

请求示例

PUT /api/user/{username} HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "email": "string",
    "enabled": "string",
    "name": "string",
    "password": "string",
    "pwdExpirationDate": "string",
    "pwdUpdateRequired": true,
    "roles": "string"
}
状态码:

UserChangePassword

POST /api/user/{username}/change_password
参数:
  • username (string) --

请求示例

POST /api/user/{username}/change_password HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "new_password": "string",
    "old_password": "string"
}
状态码:

UserPasswordPolicy

POST /api/user/validate_password

检查密码是否符合密码策略。:param password: 要验证的密码。:param username: 用户名(可选)。:param old_password: 旧密码(可选)。:return: 包含 properties valid、credits 和 valuation 的对象。‘credits’ 包含密码复杂性分数,‘valuation’ 是验证的文本摘要。

请求示例

POST /api/user/validate_password HTTP/1.1
Host: example.com
Content-Type: application/json

{
    "old_password": "string",
    "password": "string",
    "username": "string"
}
状态码:

由 Ceph 基金会为您呈现

Ceph 文档是由非营利性 Ceph 基金会 资助和托管的社区资源。如果您希望支持这项工作和我们的其他努力,请考虑 立即加入