注意

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

Ceph RESTful API

简介

The Ceph RESTful API(以下简称Ceph API)由该Ceph 仪表板模块提供。Ceph API 服务与常规 Ceph 仪表板使用相同的 URL,位于/api基路径(请参阅主机名和端口):

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

或,如果启用了 HTTPS(请参阅SSL/TLS 支持):

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

Ceph API 利用以下标准:

警告

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

身份验证和授权

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

  • 身份验证: ensures that the request is performed on behalf of an existing and valid user account.

  • 确保请求代表一个现有且有效的用户帐户。授权

因此,在开始使用 Ceph API 之前,必须获取有效的 JSON Web 令牌 (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 请求一起在AuthorizationHTTP 头部:

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>+jsonHTTP 头部。如果当前的 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>"

规范

Auth

POST /api/auth

Dashboard Authentication

示例请求:

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) --

  • 递归 (布尔值) --

示例请求:

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) -- (必需)

  • 保留策略 (string) --

  • 子卷 (string) --

  • (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) --

  • 保留快照 (布尔值) --

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

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

  • info (布尔值) --

示例请求:

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

Set Ceph authentication capabilities for the specified user ID in the given path

示例请求:

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}

Remove CephFS Volume

参数:
  • name (string) -- File System Name

状态码:
PUT /api/cephfs/rename

Rename CephFS Volume

示例请求:

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

The root directory that can’t be fetched using ls_dir (api). :param fs_id: The filesystem identifier. :return: The root directory :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

List directories of specified path. :param fs_id: The filesystem identifier. :param path: The path where to start listing the directory content. Defaults to ‘/’ if not set. :type path: str | bytes :param depth: The number of steps to go down the directory tree. :type depth: int | str :return: The names of the directories below the specified path. :rtype: list

参数:
  • fs_id (string) --

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

  • depth (整数) --

示例请求:

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

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

示例请求:

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

Get Cephfs Quotas of the specified path

Get the quotas of the specified path. :param fs_id: The filesystem identifier. :param path: The path of the directory/file. :return: Returns a dictionary containing ‘max_bytes’ and ‘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

设置指定路径的配额。

参数:
  • 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

重命名文件或目录。

参数:
  • 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

删除快照。

参数:
  • fs_id (string) --

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

  • name (string) -- (必需)

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

创建快照。

参数:
  • 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。

参数:
  • 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

删除目录。

参数:
  • fs_id (string) --

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

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

创建目录。

参数:
  • fs_id (string) --

示例请求:

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

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

删除文件、链接或符号链接。

参数:
  • fs_id (string) --

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

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

将一些数据写入指定路径。

参数:
  • 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"
}
状态码:

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 (布尔值) --

示例请求:

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 (布尔值) --

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

  • subvol_name (string) --

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

  • info (布尔值) --

示例请求:

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
状态码:

集群

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_entity}

删除 Ceph 用户

删除 ceph 用户及其定义的功能。

参数:
  • user_entity (string) -- 要删除的实体

状态码:

集群配置

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
状态码:

守护进程

GET /api/daemon

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

参数 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"
}
状态码:

消息编码配置文件

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
状态码:

功能切换端点

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
状态码:

硬件

GET /api/hardware/summary

获取硬件健康状态的摘要

获取尽可能多的硬件类别或所有类别的健康状态,如果没有给出,则获取所有类别的健康状态

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

  • hostname (string) --

示例请求:

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

健康

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/host

列出主机规格

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

  • facts (布尔值) -- 主机事实

  • offset (整数) --

  • limit (整数) --

  • search (string) --

  • sort (string) --

示例请求:

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}

Get the specified host. :raises: cherrypy.HTTPError: If host not found.

参数:
  • hostname (string) --

示例请求:

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

Update the specified host. Note, this is only supported when Ceph Orchestrator is enabled. :param hostname: The name of the host to be processed. :param update_labels: To update the labels. :param labels: List of labels. :param maintenance: Enter/Exit maintenance mode. :param force: Force enter maintenance mode. :param drain: Drain host

参数:
  • hostname (string) -- Hostname

示例请求:

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

Identify a device by switching on the device light for N seconds. :param hostname: The hostname of the device to process. :param device: The device identifier to process, e.g. /dev/dm-0ABC1234DEF567-1R1234_ABC8DE0Q. :param duration: The duration in seconds how long the LED should flash.

参数:
  • 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

Get inventory of a host

参数:
  • hostname (string) -- Hostname

查询参数:
  • refresh (string) -- Trigger asynchronous refresh

示例请求:

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

Get Iscsi discoveryauth Details

示例请求:

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

Set Iscsi discoveryauth

查询参数:
  • user (string) -- Username (Required)

  • password (string) -- Password (Required)

  • mutual_user (string) -- Mutual UserName (Required)

  • mutual_password (string) -- Mutual Password (Required)

示例请求:

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"
}
状态码:

日志

GET /api/logs/all

Display Logs Configuration

示例请求:

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

List Mgr modules

Get the list of managed modules. :return: A list of objects with the fields ‘enabled’, ‘name’ and ‘options’. :rtype: list

示例请求:

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

Retrieve the values of the persistent configuration settings. :param module_name: The name of the Ceph Mgr module. :type module_name: str :return: The values of the module options. :rtype: dict

参数:
  • module_name (string) --

示例请求:

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

Set the values of the persistent configuration settings. :param module_name: The name of the Ceph Mgr module. :type module_name: str :param config: The values of the module options to be stored. :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

Disable the specified Ceph Mgr module. :param module_name: The name of the Ceph Mgr module. :type module_name: str

参数:
  • module_name (string) --

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

Enable the specified Ceph Mgr module. :param module_name: The name of the Ceph Mgr module. :type module_name: str

参数:
  • module_name (string) --

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

Get the module options of the specified Ceph Mgr module. :param module_name: The name of the Ceph Mgr module. :type module_name: str :return: The module options as list of dicts. :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
状态码:

监控器

GET /api/monitor

Get Monitor Details

示例请求:

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

多集群

POST /api/multi-cluster/auth

Authenticate to a remote cluster

示例请求:

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 (布尔值) --

示例请求:

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

**List all or cluster specific NFS-Ganesha exports **

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

示例请求:

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

Creates a new NFS-Ganesha export

示例请求:

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}

Deletes an NFS-Ganesha export

参数:
  • cluster_id (string) -- Cluster identifier

  • export_id (整数) -- Export ID

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

Get an NFS-Ganesha export

参数:
  • cluster_id (string) -- Cluster identifier

  • export_id (string) -- Export 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}

Updates an NFS-Ganesha export

参数:
  • cluster_id (string) -- Cluster identifier

  • export_id (整数) -- Export 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 网关

GET /api/nvmeof/gateway

Get information about the NVMeoF gateway

查询参数:
  • 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/log_level
查询参数:
  • gw_group (string) --

  • traddr (string) --

示例请求:

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

示例请求:

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/version
查询参数:
  • 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
查询参数:
  • gw_group (string) --

  • traddr (string) --

示例请求:

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

示例请求:

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

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

示例请求:

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

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

NVMe-oF 子系统

GET /api/nvmeof/subsystem

List all NVMeoF subsystems

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

  • traddr (string) --

示例请求:

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

Create a new NVMeoF subsystem

示例请求:

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

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

Delete an existing NVMeoF subsystem

参数:
  • nqn (string) -- NVMeoF subsystem NQN

查询参数:
  • force (布尔值) -- Force delete

  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

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

Get information from a specific NVMeoF subsystem

参数:
  • nqn (string) -- NVMeoF subsystem NQN

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

NVMe-oF 子系统连接

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

List all NVMeoF Subsystem Connections

参数:
  • nqn (string) -- NVMeoF subsystem NQN

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

NVMe-oF 子系统主机白名单

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

List all allowed hosts for an NVMeoF subsystem

参数:
  • nqn (string) -- NVMeoF subsystem NQN

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

Allow hosts to access an NVMeoF subsystem

参数:
  • nqn (string) -- NVMeoF subsystem NQN

示例请求:

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

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

Disallow hosts from accessing an NVMeoF subsystem

参数:
  • nqn (string) -- NVMeoF subsystem NQN

  • host_nqn (string) -- NVMeoF host NQN. Use “*” to disallow any host.

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

状态码:

NVMe-oF 子系统监听器

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

List all NVMeoF listeners

参数:
  • nqn (string) -- NVMeoF subsystem NQN

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

Create a new NVMeoF listener

参数:
  • nqn (string) -- NVMeoF subsystem 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}

Delete an existing NVMeoF listener

参数:
  • nqn (string) -- NVMeoF subsystem NQN

  • host_name (string) -- NVMeoF hostname

  • traddr (string) -- NVMeoF transport address

查询参数:
  • trsvcid (整数) -- NVMeoF transport service port

  • adrfam (整数) -- NVMeoF address family (0 - IPv4, 1 - IPv6)

  • force (布尔值) --

  • gw_group (string) -- NVMeoF gateway group

状态码:

NVMe-oF 子系统命名空间

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

List all NVMeoF namespaces in a subsystem

参数:
  • nqn (string) -- NVMeoF subsystem NQN

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

Create a new NVMeoF namespace

参数:
  • nqn (string) -- NVMeoF subsystem NQN

示例请求:

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

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

Delete an existing NVMeoF namespace

参数:
  • nqn (string) -- NVMeoF subsystem NQN

  • nsid (string) -- NVMeoF Namespace ID

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

  • force (string) -- Force remove the RBD image

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

Get info from specified NVMeoF namespace

参数:
  • nqn (string) -- NVMeoF subsystem NQN

  • nsid (string) -- NVMeoF Namespace ID

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

Update an existing NVMeoF namespace

参数:
  • nqn (string) -- NVMeoF subsystem NQN

  • nsid (string) -- NVMeoF Namespace 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
}
状态码:
GET /api/nvmeof/subsystem/{nqn}/namespace/{nsid}/io_stats

Get IO stats from specified NVMeoF namespace

参数:
  • nqn (string) -- NVMeoF subsystem NQN

  • nsid (string) -- NVMeoF Namespace ID

查询参数:
  • gw_group (string) -- NVMeoF gateway group

  • traddr (string) --

示例请求:

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

OSD

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

  • limit (整数) --

  • 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

Display OSD Flags

示例请求:

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

Sets OSD flags for the entire cluster.

The recovery_deletes, sortbitwisepglog_hardlimit 的标志,默认情况下关闭。启用此标志将限制 pg 日志的长度。为了启用它,必须在完全升级到 12.2.11 后运行 flags cannot be unset. purged_snapshots cannot even be set. It is therefore required to at least include those four flags for a successful operation.

示例请求:

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

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

Displays individual OSD flags

示例请求:

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

Sets OSD flags for a subset of individual OSDs.

Updates flags (noout, noin, nodown, noup) for an individual subset of OSDs.

示例请求:

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
类型 ID:

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

Check If OSD is Safe to Destroy

类型 ID:

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 数据和 lockbox 密钥,使数据永久不可读。

在销毁 osd 之前,必须将其标记为停用。

参数:
  • 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 必须在标记为丢失之前标记为 down。down在标记为丢失之前,必须先标记为 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。down before removal.

参数:
  • svc_id (string) --

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

Reweights the OSD temporarily.

Note that ‘ceph osd reweight’ is not a persistent setting. When an OSD gets marked out, the osd weight will be set to 0. When it gets marked in again, the weight will be changed to 1.

Because of this ‘ceph osd reweight’ is a temporary solution. You should only use it to keep your cluster running while you’re ordering more hardware.

参数:
  • 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 (布尔值) --

示例请求:

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

显示 Perf 计数器

示例请求:

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

GET /api/pool

显示池列表

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

  • stats (布尔值) -- 池统计信息

示例请求:

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 (布尔值) --

示例请求:

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 (布尔值) --

示例请求:

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

示例请求:

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/zone

列出 RGW 角色

示例请求:

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

创建 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/zone

编辑 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

Get RGW Topic List

查询参数:
  • uid (string) -- Name of the user

  • 租户 (string) -- 租户名称

示例请求:

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

Create a new RGW Topic

示例请求:

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

{
    "amqp_ack_level": "string",
    "amqp_exchange": "string",
    "ca_location": "string",
    "cloud_events": "string",
    "daemon_name": "string",
    "kafka_ack_level": "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/{name}

Delete RGW Topic

参数:
  • name (string) -- Name of the user

查询参数:
  • 租户 (string) -- 租户名称

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

Get RGW Topic

参数:
  • name (string) -- Name of the user

查询参数:
  • 租户 (string) -- 租户名称

示例请求:

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

Rbd

GET /api/block/image

Display Rbd Images

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

  • offset (整数) -- offset

  • limit (整数) -- limit

  • 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

Return the RBD clone format version.

示例请求:

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}

Get Rbd Image Info

参数:
  • image_spec (string) -- URL-encoded “pool/rbd_name”. e.g. “rbd%2Ffoo”

查询参数:
  • omit_usage (布尔值) -- When true, usage information is not returned

示例请求:

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
Move an image to the trash.

Images, even ones actively in-use by clones, can be moved to the trash and deleted at a later time.

参数:
  • image_spec (string) --

示例请求:

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

{
    "delay": 1
}
状态码:

RbdMirroring

GET /api/block/mirroring/site_name

Display Rbd Mirroring sitename

示例请求:

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}

Display Rbd Mirroring Summary

参数:
  • pool_name (string) -- Pool Name

示例请求:

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

Display Rbd Mirroring Summary

示例请求:

GET /api/block/mirroring/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

Clones a snapshot to an image

参数:
  • 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

Get RBD Trash Details by pool name

List all entries from trash.

查询参数:
  • pool_name (string) -- Name of the pool

示例请求:

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

Remove all expired images from trash.

查询参数:
  • 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}
Delete an image from trash.

If image deferment time has not expired you can not removed it unless use force. But an actively in-use by clones or has snapshots can not be removed.

参数:
  • image_id_spec (string) --

查询参数:
  • force (布尔值) --

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

Restore an image from trash.

参数:
  • 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

List all issues details.

示例请求:

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

Create an issue. :param project: The affected ceph component. :param tracker: The tracker type. :param subject: The title of the issue. :param description: The description of the issue. :param api_key: Ceph tracker 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

Deletes Ceph tracker API key.

状态码:
GET /api/feedback/api_key

Returns Ceph tracker API key.

示例请求:

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

Sets Ceph tracker API key. :param api_key: The Ceph tracker API key.

示例请求:

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

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

RgwBucket

GET /api/rgw/bucket
查询参数:
  • stats (布尔值) --

  • 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) --

  • 租户 (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"
}
状态码:
GET /api/rgw/bucket/ratelimit

Get the bucket global rate limit

示例请求:

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}
参数:
  • (string) --

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

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

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

示例请求:

GET /api/rgw/bucket/{bucket} HTTP/1.1
Host: example.com
状态码:
PUT /api/rgw/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

Get the bucket rate limit

参数:
  • uid (string) --

示例请求:

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

Update the bucket rate limit

参数:
  • 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

Display RGW Daemons

示例请求:

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

Create or update the 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}

Remove the sync flow

参数:
  • 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

Create or update the 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}

Remove the sync pipe

参数:
  • group_id (string) --

  • pipe_id (string) --

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

  • destination_zones (string) --

  • bucket_name (string) --

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

Get the 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

Create the 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

Update the 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}

Remove the sync policy group

参数:
  • group_id (string) --

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

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

Get the sync policy group

参数:
  • 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

Get the 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

示例请求:

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) --

示例请求:

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

示例请求:

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

{
    "access_key": "string",
    "account_id": 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 (布尔值) --

示例请求:

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

示例请求:

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

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

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

  • perm (string) -- (必需)

  • daemon_name (string) --

状态码:
POST /api/rgw/accounts/{account_id}/quota
参数:
  • 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

Get the user rate limit

参数:
  • 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 以不删除密钥。

参数:
  • uid (string) --

  • subuser (string) --

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

  • daemon_name (string) --

状态码:

RgwUserAccounts

GET /api/rgw/accounts

列出所有账户 ID 或所有详细账户信息,基于“detailed”查询参数。

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

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

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

  • detailed (布尔值) --

示例请求:

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
状态码:
DELETE /api/rgw/zone/{zone_name}
参数:
  • zone_name (string) --

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

  • pools (string) --

  • zonegroup_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) --

状态码:
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

Display Role list

示例请求:

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

List smb clusters

List smb clusters

示例请求:

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

Create smb cluster

Create an smb cluster

param cluster_resource:

Dict cluster data

return:

Returns cluster resource.

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}

Remove an smb cluster

Remove an smb cluster

参数 cluster_id:

集群标识符

return:

None.

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

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

Get an smb cluster

Get an smb cluster by cluster id

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

示例请求:

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

List smb join authorization resources

List all smb join auth resources

return:

Returns list of join auth.

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加入认证资源

参数 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共享或所有共享

参数 cluster_id:

包含集群信息的字典

return:

返回共享列表。

rtype:

List[Dict]

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

示例请求:

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

创建smb共享

创建一个smb共享

参数 share_resource:

分享数据的字典

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共享

参数 cluster_id:

集群标识符

参数 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用户组资源

参数 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
状态码:

服务

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

  • offset (整数) --

  • limit (整数) --

  • search (string) --

  • sort (string) --

示例请求:

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

服务规范作为JSON。

参数 service_name:

服务名称,例如‘alertmanager’。

return:

示例请求:

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’,

示例请求:

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

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

return:

参数:
  • 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}
参数 service_spec:

服务规范作为JSON。

参数 service_name:

服务名称,例如‘alertmanager’。

return:

参数:
  • 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
状态码:

设置

GET /api/settings

显示设置信息

获取可用选项的列表。None.

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

示例请求:

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

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

获取给定选项。

参数:
  • 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
状态码:

任务

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
状态码:

Telemetry

PUT /api/telemetry

启用或禁用发送Telemetry模块收集的数据。

示例请求:

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

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

获取详细的Telemetry报告

获取Ceph和设备报告数据

示例请求:

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

Upgrade

GET /api/cluster/upgrade

获取可升级的版本

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

  • image (string) -- Ceph镜像

  • show_all_versions (布尔值) -- 显示所有可用版本

示例请求:

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}
参数:
  • 用户名 (string) --

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

示例请求:

GET /api/user/{username} HTTP/1.1
Host: example.com
状态码:
PUT /api/user/{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
参数:
  • 用户名 (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

检查密码是否符合密码策略。

示例请求:

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 基金会资助和托管Ceph Foundation. 如果您想支持这一点和我们的其他工作,请考虑加入现在加入.