Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Appendix A. The Ceph RESTful API specifications
As a storage administrator, you can access the various Ceph sub-systems through the Ceph RESTful API endpoints. This is a reference guide for the available Ceph RESTful API methods.
The available Ceph API endpoints:
- Section A.1, “Ceph summary”
- Section A.2, “Authentication”
- Section A.3, “Ceph File System”
- Section A.4, “Storage cluster configuration”
- Section A.5, “CRUSH rules”
- Section A.6, “Erasure code profiles”
- Section A.7, “Feature toggles”
- Section A.8, “Grafana”
- Section A.9, “Storage cluster health”
- Section A.11, “Logs”
- Section A.12, “Ceph Manager modules”
- Section A.13, “Ceph Monitor”
- Section A.14, “Ceph OSD”
- Section A.15, “Ceph Object Gateway”
- Section A.16, “REST APIs for manipulating a role”
- Section A.17, “NFS Ganesha”
- Section A.18, “Ceph Orchestrator”
- Section A.19, “Pools”
- Section A.20, “Prometheus”
- Section A.21, “RADOS block device”
- Section A.22, “Performance counters”
- Section A.23, “Roles”
- Section A.24, “Services”
- Section A.25, “Settings”
- Section A.26, “Ceph task”
- Section A.27, “Telemetry”
- Section A.28, “Ceph users”
Prerequisites
- An understanding of how to use a RESTful API.
- A healthy running Red Hat Ceph Storage cluster.
-
The Ceph Manager
dashboard
module is enabled.
A.1. Ceph summary
The method reference for using the Ceph RESTful API summary
endpoint to display the Ceph summary details.
GET /api/summary
- Description
- Display a summary of Ceph details.
- Example
GET /api/summary HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.2. Authentication
The method reference for using the Ceph RESTful API auth
endpoint to initiate a session with Red Hat Ceph Storage.
POST /api/auth
- Curl Example
curl -i -k --location -X POST 'https://192.168.0.44:8443/api/auth' -H 'Accept: application/vnd.ceph.api.v1.0+json' -H 'Content-Type: application/json' --data '{"password": "admin@123", "username": "admin"}'
- Example
POST /api/auth HTTP/1.1 Host: example.com Content-Type: application/json { "password": "STRING", "username": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/auth/check
- Description
- Check the requirement for an authentication token.
- Example
POST /api/auth/check?token=STRING HTTP/1.1 Host: example.com Content-Type: application/json { "token": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/auth/logout
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.3. Ceph File System
The method reference for using the Ceph RESTful API cephfs
endpoint to manage Ceph File Systems (CephFS).
GET /api/cephfs
- Example
GET /api/cephfs HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cephfs/FS_ID
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string.
-
Replace
- Example
GET /api/cephfs/FS_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/cephfs/FS_ID/client/CLIENT_ID
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. -
Replace
CLIENT_ID
with the Ceph client identifier string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cephfs/FS_ID/clients
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string.
-
Replace
- Example
GET /api/cephfs/FS_ID/clients HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cephfs/FS_ID/get_root_directory
- Description
-
The root directory that can not be fetched using the
ls_dir
API call. - Parameters
-
Replace
FS_ID
with the Ceph File System identifier string.
-
Replace
- Example
GET /api/cephfs/FS_ID/get_root_directory HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cephfs/FS_ID/ls_dir
- Description
- List directories for a given path.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. Queries:
-
path
- The string value where you want to start the listing. The default path is/
, if not given. -
depth
- An integer value specifying the number of steps to go down the directory tree.
-
-
Replace
- Example
GET /api/cephfs/FS_ID/ls_dir HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cephfs/FS_ID/mds_counters
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. Queries:
-
counters
- An integer value.
-
-
Replace
- Example
GET /api/cephfs/FS_ID/mds_counters HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cephfs/FS_ID/quota
- Description
- Display the CephFS quotas for the given path.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. Queries:
-
path
- A required string value specifying the directory path.
-
-
Replace
- Example
GET /api/cephfs/FS_ID/quota?path=STRING HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/cephfs/FS_ID/quota
- Description
- Sets the quota for a given path.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. -
max_bytes
- A string value defining the byte limit. -
max_files
- A string value defining the file limit. -
path
- A string value defining the path to the directory or file.
-
Replace
- Example
PUT /api/cephfs/FS_ID/quota HTTP/1.1 Host: example.com Content-Type: application/json { "max_bytes": "STRING", "max_files": "STRING", "path": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/cephfs/FS_ID/snapshot
- Description
- Remove a snapsnot.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. Queries:
-
name
- A required string value specifying the snapshot name. -
path
- A required string value defining the path to the directory.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/cephfs/FS_ID/snapshot
- Description
- Create a snapshot.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. -
name
- A string value specifying the snapshot name. If no name is specified, then a name using the current time in RFC3339 UTC format is generated. -
path
- A string value defining the path to the directory.
-
Replace
- Example
POST /api/cephfs/FS_ID/snapshot HTTP/1.1 Host: example.com Content-Type: application/json { "name": "STRING", "path": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/cephfs/FS_ID/tree
- Description
- Remove a directory.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. Queries:
-
path
- A required string value defining the path to the directory.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/cephfs/FS_ID/tree
- Description
- Creates a directory.
- Parameters
-
Replace
FS_ID
with the Ceph File System identifier string. -
path
- A string value defining the path to the directory.
-
Replace
- Example
POST /api/cephfs/FS_ID/tree HTTP/1.1 Host: example.com Content-Type: application/json { "path": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.4. Storage cluster configuration
The method reference for using the Ceph RESTful API cluster_conf
endpoint to manage the Red Hat Ceph Storage cluster.
GET /api/cluster_conf
- Example
GET /api/cluster_conf HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/cluster_conf
- Example
POST /api/cluster_conf HTTP/1.1 Host: example.com Content-Type: application/json { "name": "STRING", "value": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/cluster_conf
- Example
PUT /api/cluster_conf HTTP/1.1 Host: example.com Content-Type: application/json { "options": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cluster_conf/filter
- Description
- Display the storage cluster configuration by name.
- Parameters
Queries:
-
names
- A string value for the configuration option names.
-
- Example
GET /api/cluster_conf/filter HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/cluster_conf/NAME
- Parameters
-
Replace
NAME
with the storage cluster configuration name. Queries:
-
section
- A required string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/cluster_conf/NAME
- Parameters
-
Replace
NAME
with the storage cluster configuration name.
-
Replace
- Example
GET /api/cluster_conf/NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.5. CRUSH rules
The method reference for using the Ceph RESTful API crush_rule
endpoint to manage the CRUSH rules.
GET /api/crush_rule
- Description
- List the CRUSH rule configuration.
- Example
GET /api/crush_rule HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/crush_rule
- Example
POST /api/crush_rule HTTP/1.1 Host: example.com Content-Type: application/json { "device_class": "STRING", "failure_domain": "STRING", "name": "STRING", "root": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/crush_rule/NAME
- Parameters
-
Replace
NAME
with the rule name.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/crush_rule/NAME
- Parameters
-
Replace
NAME
with the rule name.
-
Replace
- Example
GET /api/crush_rule/NAME HTTP/1.1 Host: example.com
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.6. Erasure code profiles
The method reference for using the Ceph RESTful API erasure_code_profile
endpoint to manage the profiles for erasure coding.
GET /api/erasure_code_profile
- Description
- List erasure-coded profile information.
- Example
GET /api/erasure_code_profile HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/erasure_code_profile
- Example
POST /api/erasure_code_profile HTTP/1.1 Host: example.com Content-Type: application/json { "name": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing, check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/erasure_code_profile/NAME
- Parameters
-
Replace
NAME
with the profile name.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/erasure_code_profile/NAME
- Parameters
-
Replace
NAME
with the profile name.
-
Replace
- Example
GET /api/erasure_code_profile/NAME HTTP/1.1 Host: example.com
- Status Codes
- 202 Accepted – Operation is still executing, check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.7. Feature toggles
The method reference for using the Ceph RESTful API feature_toggles
endpoint to manage the CRUSH rules.
GET /api/feature_toggles
- Description
- List the features of Red Hat Ceph Storage.
- Example
GET /api/feature_toggles HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.8. Grafana
The method reference for using the Ceph RESTful API grafana
endpoint to manage Grafana.
POST /api/grafana/dashboards
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/grafana/url
- Description
- List the Grafana URL instance.
- Example
GET /api/grafana/url HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/grafana/validation/PARAMS
- Parameters
-
Replace
PARAMS
with a string value.
-
Replace
- Example
GET /api/grafana/validation/PARAMS HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.9. Storage cluster health
The method reference for using the Ceph RESTful API health
endpoint to display the storage cluster health details and status.
GET /api/health/full
- Example
GET /api/health/full HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/health/minimal
- Description
- Display the storage cluster’s minimal health report.
- Example
GET /api/health/minimal HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.10. Host
The method reference for using the Ceph RESTful API host
endpoint to display host, also known as node, information.
GET /api/host
- Description
- List the host specifications.
- Parameters
Queries:
-
sources
- A string value of host sources.
-
- Example
GET /api/host HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/host
- Example
POST /api/host HTTP/1.1 Host: example.com Content-Type: application/json { "hostname": "STRING", "status": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/host/HOST_NAME
- Parameters
-
Replace
HOST_NAME
with the name of the node.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/host/HOST_NAME
- Description
- Displays information on the given host.
- Parameters
-
Replace
HOST_NAME
with the name of the node.
-
Replace
- Example
GET /api/host/HOST_NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/host/HOST_NAME
- Description
- Updates information for the given host. This method is only supported when the Ceph Orchestrator is enabled.
- Parameters
-
Replace
HOST_NAME
with the name of the node. -
force
- Force the host to enter maintenance mode. -
labels
- A list of labels. -
maintenance
- Enter or exit maintenance mode. -
update_labels
- Updates the labels.
-
Replace
- Example
PUT /api/host/HOST_NAME HTTP/1.1 Host: example.com Content-Type: application/json { "force": true, "labels": [ "STRING" ], "maintenance": true, "update_labels": true }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/host/HOST_NAME/daemons
- Parameters
-
Replace
HOST_NAME
with the name of the node.
-
Replace
- Example
GET /api/host/HOST_NAME/daemons HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/host/HOST_NAME/devices
- Parameters
-
Replace
HOST_NAME
with the name of the node.
-
Replace
- Example
GET /api/host/HOST_NAME/devices HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/host/HOST_NAME/identify_device
- Description
- Identify a device by switching on the device’s light for a specified number of seconds.
- Parameters
-
Replace
HOST_NAME
with the name of the node. -
device
- The device id, such as,/dev/dm-0
orABC1234DEF567-1R1234_ABC8DE0Q
. -
duration
- The number of seconds the device’s LED should flash.
-
Replace
- Example
POST /api/host/HOST_NAME/identify_device HTTP/1.1 Host: example.com Content-Type: application/json { "device": "STRING", "duration": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/host/HOST_NAME/inventory
- Description
- Display the inventory of the host.
- Parameters
-
Replace
HOST_NAME
with the name of the node. Queries:
-
refresh
- A string value to trigger an asynchronous refresh.
-
-
Replace
- Example
GET /api/host/HOST_NAME/inventory HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/host/HOST_NAME/smart
- Parameters
-
Replace
HOST_NAME
with the name of the node.
-
Replace
- Example
GET /api/host/HOST_NAME/smart HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.11. Logs
The method reference for using the Ceph RESTful API logs
endpoint to display log information.
GET /api/logs/all
- Description
- View all the log configuration.
- Example
GET /api/logs/all HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.12. Ceph Manager modules
The method reference for using the Ceph RESTful API mgr/module
endpoint to manage the Ceph Manager modules.
GET /api/mgr/module
- Description
- View the list of managed modules.
- Example
GET /api/mgr/module HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/mgr/module/MODULE_NAME
- Description
- Retrieve the values of the persistent configuration settings.
- Parameters
-
Replace
MODULE_NAME
with the Ceph Manager module name.
-
Replace
- Example
GET /api/mgr/module/MODULE_NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/mgr/module/MODULE_NAME
- Description
- Set the values of the persistent configuration settings.
- Parameters
-
Replace
MODULE_NAME
with the Ceph Manager module name. -
config
- The values of the module options.
-
Replace
- Example
PUT /api/mgr/module/MODULE_NAME HTTP/1.1 Host: example.com Content-Type: application/json { "config": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/mgr/module/MODULE_NAME/disable
- Description
- Disable the given Ceph Manager module.
- Parameters
-
Replace
MODULE_NAME
with the Ceph Manager module name.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/mgr/module/MODULE_NAME/enable
- Description
- Enable the given Ceph Manager module.
- Parameters
-
Replace
MODULE_NAME
with the Ceph Manager module name.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/mgr/module/MODULE_NAME/options
- Description
- View the options for the given Ceph Manager module.
- Parameters
-
Replace
MODULE_NAME
with the Ceph Manager module name.
-
Replace
- Example
GET /api/mgr/module/MODULE_NAME/options HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.13. Ceph Monitor
The method reference for using the Ceph RESTful API monitor
endpoint to display information on the Ceph Monitor.
GET /api/monitor
- Description
- View Ceph Monitor details.
- Example
GET /api/monitor HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.14. Ceph OSD
The method reference for using the Ceph RESTful API osd
endpoint to manage the Ceph OSDs.
GET /api/osd
- Example
GET /api/osd HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/osd
- Example
POST /api/osd HTTP/1.1 Host: example.com Content-Type: application/json { "data": "STRING", "method": "STRING", "tracking_id": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/flags
- Description
- View the Ceph OSD flags.
- Example
GET /api/osd/flags HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/osd/flags
- Description
- Sets the Ceph OSD flags for the entire storage cluster.
- Parameters
-
The
recovery_deletes
,sortbitwise
, andpglog_hardlimit
flags can not be unset. The
purged_snapshots
flag can not be set.ImportantYou must include these four flags for a successful operation.
-
The
- Example
PUT /api/osd/flags HTTP/1.1 Host: example.com Content-Type: application/json { "flags": [ "STRING" ] }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/flags/individual
- Description
- View the individual Ceph OSD flags.
- Example
GET /api/osd/flags/individual HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/osd/flags/individual
- Description
-
Updates the
noout
,noin
,nodown
, andnoup
flags for an individual subset of Ceph OSDs. - Example
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 ] }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/safe_to_delete
- Parameters
Queries:
-
svc_ids
- A required string of the Ceph OSD service identifier.
-
- Example
GET /api/osd/safe_to_delete?svc_ids=STRING HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/safe_to_destroy
- Description
- Check to see if the Ceph OSD is safe to destroy.
- Parameters
Queries:
-
ids
- A required string of the Ceph OSD service identifier.
-
- Example
GET /api/osd/safe_to_destroy?ids=STRING HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/osd/SVC_ID
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier. Queries:
-
preserve_id
- A string value. -
force
- A string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/SVC_ID
- Description
- Returns collected data about a Ceph OSD.
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
GET /api/osd/SVC_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/osd/SVC_ID
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
PUT /api/osd/SVC_ID HTTP/1.1 Host: example.com Content-Type: application/json { "device_class": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/osd/SVC_ID/destroy
- Description
Marks Ceph OSD as being destroyed. The Ceph OSD must be marked down before being destroyed. This operation keeps the Ceph OSD identifier intact, but removes the Cephx keys, configuration key data, and lockbox keys.
WarningThis operation renders the data permanently unreadable.
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/SVC_ID/devices
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
GET /api/osd/SVC_ID/devices HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/SVC_ID/histogram
- Description
- Returns the Ceph OSD histogram data.
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
GET /api/osd/SVC_ID/histogram HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/osd/SVC_ID/mark
- Description
Marks a Ceph OSD
out
,in
,down
, andlost
.NoteA Ceph OSD must be marked
down
before marking itlost
.- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
PUT /api/osd/SVC_ID/mark HTTP/1.1 Host: example.com Content-Type: application/json { "action": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/osd/SVC_ID/purge
- Description
Removes the Ceph OSD from the CRUSH map.
NoteThe Ceph OSD must be marked
down
before removal.- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/osd/SVC_ID/reweight
- Description
-
Temporarily reweights the Ceph OSD. When a Ceph OSD is marked
out
, the OSD’s weight is set to0
. When the Ceph OSD is marked backin
, the OSD’s weight is set to1
. - Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
POST /api/osd/SVC_ID/reweight HTTP/1.1 Host: example.com Content-Type: application/json { "weight": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/osd/SVC_ID/scrub
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier. Queries:
-
deep
- A boolean value, eithertrue
orfalse
.
-
-
Replace
- Example
POST /api/osd/SVC_ID/scrub HTTP/1.1 Host: example.com Content-Type: application/json { "deep": true }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/osd/SVC_ID/smart
- Parameters
-
Replace
SVC_ID
with a string value for the Ceph OSD service identifier.
-
Replace
- Example
GET /api/osd/SVC_ID/smart HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.15. Ceph Object Gateway
The method reference for using the Ceph RESTful API rgw
endpoint to manage the Ceph Object Gateway.
GET /api/rgw/status
- Description
- Display the Ceph Object Gateway status.
- Example
GET /api/rgw/status HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/daemon
- Description
- Display the Ceph Object Gateway daemons.
- Example
GET /api/rgw/daemon HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/daemon/SVC_ID
- Parameters
-
Replace
SVC_ID
with the service identifier as a string value.
-
Replace
- Example
GET /api/rgw/daemon/SVC_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/site
- Parameters
Queries:
-
query
- A string value. -
daemon_name
- The name of the daemon as a string value.
-
- Example
GET /api/rgw/site HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Bucket Management
GET /api/rgw/bucket
- Parameters
Queries:
-
stats
- A boolean value for bucket statistics. -
daemon_name
- The name of the daemon as a string value.
-
- Example
GET /api/rgw/bucket HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/rgw/bucket
- Example
POST /api/rgw/bucket HTTP/1.1 Host: example.com Content-Type: application/json { "bucket": "STRING", "daemon_name": "STRING", "lock_enabled": "false", "lock_mode": "STRING", "lock_retention_period_days": "STRING", "lock_retention_period_years": "STRING", "placement_target": "STRING", "uid": "STRING", "zonegroup": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/rgw/bucket/BUCKET
- Parameters
-
Replace
BUCKET
with the bucket name as a string value. Queries:
-
purge_objects
- A string value. -
daemon_name
- The name of the daemon as a string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/bucket/BUCKET
- Parameters
-
Replace
BUCKET
with the bucket name as a string value. Queries:
-
daemon_name
- The name of the daemon as a string value.
-
-
Replace
- Example
GET /api/rgw/bucket/BUCKET HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/rgw/bucket/BUCKET
- Parameters
-
Replace
BUCKET
with the bucket name as a string value.
-
Replace
- Example
PUT /api/rgw/bucket/BUCKET HTTP/1.1 Host: example.com Content-Type: application/json { "bucket_id": "STRING", "daemon_name": "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", "uid": "STRING", "versioning_state": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
User Management
GET /api/rgw/user
- Description
- Display the Ceph Object Gateway users.
- Parameters
Queries:
-
daemon_name
- The name of the daemon as a string value.
-
- Example
GET /api/rgw/user HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/rgw/user
- Example
POST /api/rgw/user HTTP/1.1 Host: example.com Content-Type: application/json { "access_key": "STRING", "daemon_name": "STRING", "display_name": "STRING", "email": "STRING", "generate_key": "STRING", "max_buckets": "STRING", "secret_key": "STRING", "suspended": "STRING", "uid": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/user/get_emails
- Parameters
Queries:
-
daemon_name
- The name of the daemon as a string value.
-
- Example
GET /api/rgw/user/get_emails HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/rgw/user/UID
- Parameters
-
Replace
UID
with the user identifier as a string. Queries:
-
daemon_name
- The name of the daemon as a string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/user/UID
- Parameters
-
Replace
UID
with the user identifier as a string. Queries:
-
daemon_name
- The name of the daemon as a string value. -
stats
- A boolean value for user statistics.
-
-
Replace
- Example
GET /api/rgw/user/UID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/rgw/user/UID
- Parameters
-
Replace
UID
with the user identifier as a string.
-
Replace
- Example
PUT /api/rgw/user/UID HTTP/1.1 Host: example.com Content-Type: application/json { "daemon_name": "STRING", "display_name": "STRING", "email": "STRING", "max_buckets": "STRING", "suspended": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/rgw/user/UID/capability
- Parameters
-
Replace
UID
with the user identifier as a string. Queries:
-
daemon_name
- The name of the daemon as a string value. -
type
- Required. A string value. -
perm
- Required. A string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/rgw/user/UID/capability
- Parameters
-
Replace
UID
with the user identifier as a string.
-
Replace
- Example
POST /api/rgw/user/UID/capability HTTP/1.1 Host: example.com Content-Type: application/json { "daemon_name": "STRING", "perm": "STRING", "type": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/rgw/user/UID/key
- Parameters
-
Replace
UID
with the user identifier as a string. Queries:
-
daemon_name
- The name of the daemon as a string value. -
key_type
- A string value. -
subuser
- A string value. -
access_key
- A string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/rgw/user/UID/key
- Parameters
-
Replace
UID
with the user identifier as a string.
-
Replace
- Example
POST /api/rgw/user/UID/key HTTP/1.1 Host: example.com Content-Type: application/json { "access_key": "STRING", "daemon_name": "STRING", "generate_key": "true", "key_type": "s3", "secret_key": "STRING", "subuser": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/rgw/user/UID/quota
- Parameters
-
Replace
UID
with the user identifier as a string.
-
Replace
- Example
GET /api/rgw/user/UID/quota HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/rgw/user/UID/quota
- Parameters
-
Replace
UID
with the user identifier as a string.
-
Replace
- Example
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" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/rgw/user/UID/subuser
- Parameters
-
Replace
UID
with the user identifier as a string.
-
Replace
- Example
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": "true", "key_type": "s3", "secret_key": "STRING", "subuser": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/rgw/user/UID/subuser/SUBUSER
- Parameters
-
Replace
UID
with the user identifier as a string. -
Replace
SUBUSER
with the sub user name as a string. Queries:
-
purge_keys
- Set tofalse
to not purge the keys. This only works for S3 subusers. -
daemon_name
- The name of the daemon as a string value.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.16. REST APIs for manipulating a role
In addition to the radosgw-admin role
commands, you can use the REST APIs for manipulating a role.
To invoke the REST admin APIs, create a user with admin caps.
Example
[root@host01 ~]# radosgw-admin --uid TESTER --display-name "TestUser" --access_key TESTER --secret test123 user create [root@host01 ~]# radosgw-admin caps add --uid="TESTER" --caps="roles=*"
Create a role:
Syntax
POST “<hostname>?Action=CreateRole&RoleName=ROLE_NAME&Path=PATH_TO_FILE&AssumeRolePolicyDocument=TRUST_RELATIONSHIP_POLICY_DOCUMENT”
Example
POST “<hostname>?Action=CreateRole&RoleName=S3Access&Path=/application_abc/component_xyz/&AssumeRolePolicyDocument={"Version":"2022-06-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["arn:aws:iam:::user/TESTER"]},"Action":["sts:AssumeRole"]}]}”
Example response
<role> <id>8f41f4e0-7094-4dc0-ac20-074a881ccbc5</id> <name>S3Access</name> <path>/application_abc/component_xyz/</path> <arn>arn:aws:iam:::role/application_abc/component_xyz/S3Access</arn> <create_date>2022-06-23T07:43:42.811Z</create_date> <max_session_duration>3600</max_session_duration> <assume_role_policy_document>{"Version":"2022-06-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["arn:aws:iam:::user/TESTER"]},"Action":["sts:AssumeRole"]}]}</assume_role_policy_document> </role>
Get a role:
Syntax
POST “<hostname>?Action=GetRole&RoleName=ROLE_NAME”
Example
POST “<hostname>?Action=GetRole&RoleName=S3Access”
Example response
<role> <id>8f41f4e0-7094-4dc0-ac20-074a881ccbc5</id> <name>S3Access</name> <path>/application_abc/component_xyz/</path> <arn>arn:aws:iam:::role/application_abc/component_xyz/S3Access</arn> <create_date>2022-06-23T07:43:42.811Z</create_date> <max_session_duration>3600</max_session_duration> <assume_role_policy_document>{"Version":"2022-06-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["arn:aws:iam:::user/TESTER"]},"Action":["sts:AssumeRole"]}]}</assume_role_policy_document> </role>
List a role:
Syntax
POST “<hostname>?Action=GetRole&RoleName=ROLE_NAME&PathPrefix=PATH_PREFIX”
Example request
POST “<hostname>?Action=ListRoles&RoleName=S3Access&PathPrefix=/application”
Example response
<role> <id>8f41f4e0-7094-4dc0-ac20-074a881ccbc5</id> <name>S3Access</name> <path>/application_abc/component_xyz/</path> <arn>arn:aws:iam:::role/application_abc/component_xyz/S3Access</arn> <create_date>2022-06-23T07:43:42.811Z</create_date> <max_session_duration>3600</max_session_duration> <assume_role_policy_document>{"Version":"2022-06-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["arn:aws:iam:::user/TESTER"]},"Action":["sts:AssumeRole"]}]}</assume_role_policy_document> </role>
Update the assume role policy document:
Syntax
POST “<hostname>?Action=UpdateAssumeRolePolicy&RoleName=ROLE_NAME&PolicyDocument=TRUST_RELATIONSHIP_POLICY_DOCUMENT”
Example
POST “<hostname>?Action=UpdateAssumeRolePolicy&RoleName=S3Access&PolicyDocument={"Version":"2022-06-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["arn:aws:iam:::user/TESTER2"]},"Action":["sts:AssumeRole"]}]}”
Update policy attached to a role:
Syntax
POST “<hostname>?Action=PutRolePolicy&RoleName=ROLE_NAME&PolicyName=POLICY_NAME&PolicyDocument=TRUST_RELATIONSHIP_POLICY_DOCUMENT”
Example
POST “<hostname>?Action=PutRolePolicy&RoleName=S3Access&PolicyName=Policy1&PolicyDocument={"Version":"2022-06-17","Statement":[{"Effect":"Allow","Action":["s3:CreateBucket"],"Resource":"arn:aws:s3:::example_bucket"}]}”
List permission policy names attached to a role:
Syntax
POST “<hostname>?Action=ListRolePolicies&RoleName=ROLE_NAME”
Example
POST “<hostname>?Action=ListRolePolicies&RoleName=S3Access” <PolicyNames> <member>Policy1</member> </PolicyNames>
Get permission policy attached to a role:
Syntax
POST “<hostname>?Action=GetRolePolicy&RoleName=ROLE_NAME&PolicyName=POLICY_NAME”
Example
POST “<hostname>?Action=GetRolePolicy&RoleName=S3Access&PolicyName=Policy1” <GetRolePolicyResult> <PolicyName>Policy1</PolicyName> <RoleName>S3Access</RoleName> <Permission_policy>{"Version":"2022-06-17","Statement":[{"Effect":"Allow","Action":["s3:CreateBucket"],"Resource":"arn:aws:s3:::example_bucket"}]}</Permission_policy> </GetRolePolicyResult>
Delete policy attached to a role:
Syntax
POST “hostname>?Action=DeleteRolePolicy&RoleName=ROLE_NAME&PolicyName=POLICY_NAME“
Example
POST “<hostname>?Action=DeleteRolePolicy&RoleName=S3Access&PolicyName=Policy1”
Delete a role:
NoteYou can delete a role only when it does not have any permission policy attached to it.
Syntax
POST “<hostname>?Action=DeleteRole&RoleName=ROLE_NAME"
Example
POST “<hostname>?Action=DeleteRole&RoleName=S3Access"
Additional Resources
- See the Role management section in the Red Hat Ceph Storage Object Gateway Guide for details.
A.17. NFS Ganesha
The method reference for using the Ceph RESTful API nfs-ganesha
endpoint to manage the Ceph NFS gateway.
GET /api/nfs-ganesha/daemon
- Description
- View information on the NFS Ganesha daemons.
- Example
GET /api/nfs-ganesha/daemon HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/nfs-ganesha/export
- Description
- View all of the NFS Ganesha exports.
- Example
GET /api/nfs-ganesha/export HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/nfs-ganesha/export
- Description
- Creates a new NFS Ganesha export.
- Example
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", "daemons": [ "STRING" ], "fsal": { "filesystem": "STRING", "name": "STRING", "rgw_user_id": "STRING", "sec_label_xattr": "STRING", "user_id": "STRING" }, "path": "STRING", "protocols": [ 1 ], "pseudo": "STRING", "reload_daemons": true, "security_label": "STRING", "squash": "STRING", "tag": "STRING", "transports": [ "STRING" ] }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/nfs-ganesha/export/CLUSTER_ID/EXPORT_ID
- Description
- Deletes a NFS Ganesha export.
- Parameters
-
Replace
CLUSTER_ID
with the storage cluster identifier string. -
Replace
EXPORT_ID
with the export identifier as an integer. Queries:
-
reload_daemons
- A boolean value that triggers the reloading of the NFS Ganesha daemons configuration.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/nfs-ganesha/export/CLUSTER_ID/EXPORT_ID
- Description
- View NFS Ganesha export information.
- Parameters
-
Replace
CLUSTER_ID
with the storage cluster identifier string. -
Replace
EXPORT_ID
with the export identifier as an integer.
-
Replace
- Example
GET /api/nfs-ganesha/export/CLUSTER_ID/EXPORT_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/nfs-ganesha/export/CLUSTER_ID/EXPORT_ID
- Description
- Update the NFS Ganesha export information.
- Parameters
-
Replace
CLUSTER_ID
with the storage cluster identifier string. -
Replace
EXPORT_ID
with the export identifier as an integer.
-
Replace
- Example
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" } ], "daemons": [ "STRING" ], "fsal": { "filesystem": "STRING", "name": "STRING", "rgw_user_id": "STRING", "sec_label_xattr": "STRING", "user_id": "STRING" }, "path": "STRING", "protocols": [ 1 ], "pseudo": "STRING", "reload_daemons": true, "security_label": "STRING", "squash": "STRING", "tag": "STRING", "transports": [ "STRING" ] }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/nfs-ganesha/status
- Description
- View the status information for the NFS Ganesha management feature.
- Example
GET /api/nfs-ganesha/status HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
- See the Exporting the Namespace to NFS-Ganesha section in the Red Hat Ceph Storage Object Gateway Guide for more information.
A.18. Ceph Orchestrator
The method reference for using the Ceph RESTful API orchestrator
endpoint to display the Ceph Orchestrator status.
GET /api/orchestrator/status
- Description
- Display the Ceph Orchestrator status.
- Example
GET /api/orchestrator/status HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.19. Pools
The method reference for using the Ceph RESTful API pool
endpoint to manage the storage pools.
GET /api/pool
- Description
- Display the pool list.
- Parameters
Queries:
-
attrs
- A string value of pool attributes. -
stats
- A boolean value for pool statistics.
-
- Example
GET /api/pool HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/pool
- Example
POST /api/pool HTTP/1.1 Host: example.com Content-Type: application/json { "application_metadata": "STRING", "configuration": "STRING", "erasure_code_profile": "STRING", "flags": "STRING", "pg_num": 1, "pool": "STRING", "pool_type": "STRING", "rule_name": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/pool/POOL_NAME
- Parameters
-
Replace
POOL_NAME
with the name of the pool.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/pool/POOL_NAME
- Parameters
-
Replace
POOL_NAME
with the name of the pool. Queries:
-
attrs
- A string value of pool attributes. -
stats
- A boolean value for pool statistics.
-
-
Replace
- Example
GET /api/pool/POOL_NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/pool/POOL_NAME
- Parameters
-
Replace
POOL_NAME
with the name of the pool.
-
Replace
- Example
PUT /api/pool/POOL_NAME HTTP/1.1 Host: example.com Content-Type: application/json { "application_metadata": "STRING", "configuration": "STRING", "flags": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/pool/POOL_NAME/configuration
- Parameters
-
Replace
POOL_NAME
with the name of the pool.
-
Replace
- Example
GET /api/pool/POOL_NAME/configuration HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.20. Prometheus
The method reference for using the Ceph RESTful API prometheus
endpoint to manage Prometheus.
GET /api/prometheus
- Example
GET /api/prometheus/rules HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/prometheus/rules
- Example
GET /api/prometheus/rules HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/prometheus/silence
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/prometheus/silence/S_ID
- Parameters
-
Replace
S_ID
with a string value.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/prometheus/silences
- Example
GET /api/prometheus/silences HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/prometheus/notifications
- Example
GET /api/prometheus/notifications HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.21. RADOS block device
The method reference for using the Ceph RESTful API block
endpoint to manage RADOS block devices (RBD). This reference includes all available RBD feature endpoints, such as:
RBD Images
GET /api/block/image
- Description
- View the RBD images.
- Parameters
Queries:
-
pool_name
- The pool name as a string.
-
- Example
GET /api/block/image HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image
- Example
POST /api/block/image HTTP/1.1 Host: example.com Content-Type: application/json { "configuration": "STRING", "data_pool": "STRING", "features": "STRING", "name": "STRING", "namespace": "STRING", "obj_size": 1, "pool_name": "STRING", "size": 1, "stripe_count": 1, "stripe_unit": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/block/image/clone_format_version
- Description
- Returns the RBD clone format version.
- Example
GET /api/block/image/clone_format_version HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/block/image/default_features
- Example
GET /api/block/image/default_features HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/block/image/default_features
- Example
GET /api/block/image/default_features HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/block/image/IMAGE_SPEC
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/block/image/IMAGE_SPEC
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Example
GET /api/block/image/IMAGE_SPEC HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/block/image/IMAGE_SPEC
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Example
PUT /api/block/image/IMAGE_SPEC HTTP/1.1 Host: example.com Content-Type: application/json { "configuration": "STRING", "features": "STRING", "name": "STRING", "size": 1 }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/IMAGE_SPEC/copy
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Example
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", "obj_size": 1, "snapshot_name": "STRING", "stripe_count": 1, "stripe_unit": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/IMAGE_SPEC/flatten
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/IMAGE_SPEC/move_trash
- Description
- Move an image to the trash. Images actively in-use by clones can be moved to the trash, and deleted at a later time.
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Example
POST /api/block/image/IMAGE_SPEC/move_trash HTTP/1.1 Host: example.com Content-Type: application/json { "delay": 1 }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Mirroring
GET /api/block/mirroring/site_name
- Description
- Display the RBD mirroring site name.
- Example
GET /api/block/mirroring/site_name HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/block/mirroring/site_name
- Example
PUT /api/block/mirroring/site_name HTTP/1.1 Host: example.com Content-Type: application/json { "site_name": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Mirroring Pool Bootstrap
POST /api/block/mirroring/pool/POOL_NAME/bootstrap/peer
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
POST /api/block/mirroring/pool/POOL_NAME/bootstrap/peer HTTP/1.1 Host: example.com Content-Type: application/json { "direction": "STRING", "token": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/mirroring/pool/POOL_NAME/bootstrap/token
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Mirroring Pool Mode
GET /api/block/mirroring/pool/POOL_NAME
- Description
- Display the RBD mirroring summary.
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
GET /api/block/mirroring/pool/POOL_NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/block/mirroring/pool/POOL_NAME
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
PUT /api/block/mirroring/pool/POOL_NAME HTTP/1.1 Host: example.com Content-Type: application/json { "mirror_mode": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Mirroring Pool Peer
GET /api/block/mirroring/pool/POOL_NAME/peer
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
GET /api/block/mirroring/pool/POOL_NAME/peer HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/mirroring/pool/POOL_NAME/peer
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
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" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/block/mirroring/pool/POOL_NAME/peer/PEER_UUID
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string. -
Replace
PEER_UUID
with the UUID of the peer as a string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/block/mirroring/pool/POOL_NAME/peer/PEER_UUID
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string. -
Replace
PEER_UUID
with the UUID of the peer as a string.
-
Replace
- Example
GET /api/block/mirroring/pool/POOL_NAME/peer/PEER_UUID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/block/mirroring/pool/POOL_NAME/peer/PEER_UUID
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string. -
Replace
PEER_UUID
with the UUID of the peer as a string.
-
Replace
- Example
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" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Mirroring Summary
GET /api/block/mirroring/summary
- Description
- Display the RBD mirroring summary.
- Example
GET /api/block/mirroring/summary HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Namespace
GET /api/block/pool/POOL_NAME/namespace
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
GET /api/block/pool/POOL_NAME/namespace HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/pool/POOL_NAME/namespace
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string.
-
Replace
- Example
POST /api/block/pool/POOL_NAME/namespace HTTP/1.1 Host: example.com Content-Type: application/json { "namespace": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/block/pool/POOL_NAME/namespace/NAMESPACE
- Parameters
-
Replace
POOL_NAME
with the name of the pool as a string. -
Replace
NAMESPACE
with the namespace as a string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Snapshots
POST /api/block/image/IMAGE_SPEC/snap
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value.
-
Replace
- Example
POST /api/block/image/IMAGE_SPEC/snap HTTP/1.1 Host: example.com Content-Type: application/json { "snapshot_name": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/block/image/IMAGE_SPEC/snap/SNAPSHOT_NAME
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value. -
Replace
SNAPSHOT_NAME
with the name of the snapshot as a string value.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/block/image/IMAGE_SPEC/snap/SNAPSHOT_NAME
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value. -
Replace
SNAPSHOT_NAME
with the name of the snapshot as a string value.
-
Replace
- Example
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" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/IMAGE_SPEC/snap/SNAPSHOT_NAME/clone
- Description
- Clones a snapshot to an image.
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value. -
Replace
SNAPSHOT_NAME
with the name of the snapshot as a string value.
-
Replace
- Example
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", "obj_size": 1, "stripe_count": 1, "stripe_unit": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/IMAGE_SPEC/snap/SNAPSHOT_NAME/rollback
- Parameters
-
Replace
IMAGE_SPEC
with the image name as a string value. -
Replace
SNAPSHOT_NAME
with the name of the snapshot as a string value.
-
Replace
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
RBD Trash
GET /api/block/image/trash
- Description
- Display all the RBD trash entries, or the RBD trash details by pool name.
- Parameters
Queries:
-
pool_name
- The name of the pool as a string value.
-
- Example
GET /api/block/image/trash HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/trash/purge
- Description
- Remove all the expired images from trash.
- Parameters
Queries:
-
pool_name
- The name of the pool as a string value.
-
- Example
POST /api/block/image/trash/purge HTTP/1.1 Host: example.com Content-Type: application/json { "pool_name": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/block/image/trash/IMAGE_ID_SPEC
- Description
-
Deletes an image from the trash. If the image deferment time has not expired, you can not delete it unless you use
force
. An actively in-use image by clones or has snapshots, it can not be deleted. - Parameters
-
Replace
IMAGE_ID_SPEC
with the image name as a string value. Queries:
-
force
- A boolean value to force the deletion of an image from trash.
-
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/block/image/trash/IMAGE_ID_SPEC/restore
- Description
- Restores an image from the trash.
- Parameters
-
Replace
IMAGE_ID_SPEC
with the image name as a string value.
-
Replace
- Example
POST /api/block/image/trash/IMAGE_ID_SPEC/restore HTTP/1.1 Host: example.com Content-Type: application/json { "new_image_name": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.22. Performance counters
The method reference for using the Ceph RESTful API perf_counters
endpoint to display the various Ceph performance counter. This reference includes all available performance counter endpoints, such as:
- Ceph Metadata Server (MDS)
- Ceph Manager
- Ceph Monitor
- Ceph OSD
- Ceph Object Gateway
- Ceph RADOS Block Device (RBD) Mirroring
GET /api/perf_counters
- Description
- Displays the performance counters.
- Example
GET /api/perf_counters HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Ceph Metadata Server
GET /api/perf_counters/mds/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/mds/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Ceph Manager
GET /api/perf_counters/mgr/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/mgr/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Ceph Monitor
GET /api/perf_counters/mon/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/mon/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Ceph OSD
GET /api/perf_counters/osd/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/osd/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Ceph RADOS Block Device (RBD) Mirroring
GET /api/perf_counters/rbd-mirror/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/rbd-mirror/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Ceph Object Gateway
GET /api/perf_counters/rgw/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/rgw/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
TCMU Runner
GET /api/perf_counters/tcmu-runner/SERVICE_ID
- Parameters
-
Replace
SERVICE_ID
with the required service identifier as a string.
-
Replace
- Example
GET /api/perf_counters/tcmu-runner/SERVICE_ID HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.23. Roles
The method reference for using the Ceph RESTful API role
endpoint to manage the various user roles in Ceph.
GET /api/role
- Description
- Display the role list.
- Example
GET /api/role HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/role
- Example
POST /api/role HTTP/1.1 Host: example.com Content-Type: application/json { "description": "STRING", "name": "STRING", "scopes_permissions": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/role/NAME
- Parameters
-
Replace
NAME
with the role name as a string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/role/NAME
- Parameters
-
Replace
NAME
with the role name as a string.
-
Replace
- Example
GET /api/role/NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/role/NAME
- Parameters
-
Replace
NAME
with the role name as a string.
-
Replace
- Example
PUT /api/role/NAME HTTP/1.1 Host: example.com Content-Type: application/json { "description": "STRING", "scopes_permissions": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/role/NAME/clone
- Parameters
-
Replace
NAME
with the role name as a string.
-
Replace
- Example
POST /api/role/NAME/clone HTTP/1.1 Host: example.com Content-Type: application/json { "new_name": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.24. Services
The method reference for using the Ceph RESTful API service
endpoint to manage the various Ceph services.
GET /api/service
- Parameters
Queries:
-
service_name
- The name of the service as a string.
-
- Example
GET /api/service HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/service
- Parameters
-
service_spec
- The service specification as a JSON file. -
service_name
- The name of the service.
-
- Example
POST /api/service HTTP/1.1 Host: example.com Content-Type: application/json { "service_name": "STRING", "service_spec": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/service/known_types
- Description
- Display a list of known service types.
- Example
GET /api/service/known_types HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/service/SERVICE_NAME
- Parameters
-
Replace
SERVICE_NAME
with the name of the service as a string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/service/SERVICE_NAME
- Parameters
-
Replace
SERVICE_NAME
with the name of the service as a string.
-
Replace
- Example
GET /api/service/SERVICE_NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/service/SERVICE_NAME/daemons
- Parameters
-
Replace
SERVICE_NAME
with the name of the service as a string.
-
Replace
- Example
GET /api/service/SERVICE_NAME/daemons HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.25. Settings
The method reference for using the Ceph RESTful API settings
endpoint to manage the various Ceph settings.
GET /api/settings
- Description
- Display the list of available options
- Parameters
Queries:
-
names
- A comma-separated list of option names.
-
- Example
GET /api/settings HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/settings
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/settings/NAME
- Parameters
-
Replace
NAME
with the option name as a string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/settings/NAME
- Description
- Display the given option.
- Parameters
-
Replace
NAME
with the option name as a string.
-
Replace
- Example
GET /api/settings/NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/settings/NAME
- Parameters
-
Replace
NAME
with the option name as a string.
-
Replace
- Example
PUT /api/settings/NAME HTTP/1.1 Host: example.com Content-Type: application/json { "value": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.26. Ceph task
The method reference for using the Ceph RESTful API task
endpoint to display Ceph tasks.
GET /api/task
- Description
- Display Ceph tasks.
- Parameters
Queries:
-
name
- The name of the task.
-
- Example
GET /api/task HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
A.27. Telemetry
The method reference for using the Ceph RESTful API telemetry
endpoint to manage data for the telemetry Ceph Manager module.
PUT /api/telemetry
- Description
- Enables or disables the sending of collected data by the telemetry module.
- Parameters
-
enable
- A boolean value. -
license_name
- A string value, such as,sharing-1-0
. Make sure the user is aware of and accepts the license for sharing telemetry data.
-
- Example
PUT /api/telemetry HTTP/1.1 Host: example.com Content-Type: application/json { "enable": true, "license_name": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/telemetry/report
- Description
- Display report data on Ceph and devices.
- Example
GET /api/telemetry/report HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.
- See the Activating and deactivating telemetry chapter in the Red Hat Ceph Storage Dashboard Guide for details about managing with the Ceph dashboard.
A.28. Ceph users
The method reference for using the Ceph RESTful API user
endpoint to display Ceph user details and to manage Ceph user passwords.
GET /api/user
- Description
- Display a list of users.
- Example
GET /api/user HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/user
- Example
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" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
DELETE /api/user/USER_NAME
- Parameters
-
Replace
USER_NAME
with the name of the user as a string.
-
Replace
- Status Codes
- 202 Accepted – Operation is still executing. Please check the task queue.
- 204 No Content – Resource deleted.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
GET /api/user/USER_NAME
- Parameters
-
Replace
USER_NAME
with the name of the user as a string.
-
Replace
- Example
GET /api/user/USER_NAME HTTP/1.1 Host: example.com
- Status Codes
- 200 OK – Okay.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
PUT /api/user/USER_NAME
- Parameters
-
Replace
USER_NAME
with the name of the user as a string.
-
Replace
- Example
PUT /api/user/USER_NAME HTTP/1.1 Host: example.com Content-Type: application/json { "email": "STRING", "enabled": "STRING", "name": "STRING", "password": "STRING", "pwdExpirationDate": "STRING", "pwdUpdateRequired": true, "roles": "STRING" }
- Status Codes
- 200 OK – Okay.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/user/USER_NAME/change_password
- Parameters
-
Replace
USER_NAME
with the name of the user as a string.
-
Replace
- Example
POST /api/user/USER_NAME/change_password HTTP/1.1 Host: example.com Content-Type: application/json { "new_password": "STRING", "old_password": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
POST /api/user/validate_password
- Description
- Checks the password to see if it meets the password policy.
- Parameters
-
password
- The password to validate. -
username
- Optional. The name of the user. -
old_password
- Optional. The old password.
-
- Example
POST /api/user/validate_password HTTP/1.1 Host: example.com Content-Type: application/json { "old_password": "STRING", "password": "STRING", "username": "STRING" }
- Status Codes
- 201 Created – Resource created.
- 202 Accepted – Operation is still executing. Please check the task queue.
- 400 Bad Request – Operation exception. Please check the response body for details.
- 401 Unauthorized – Unauthenticated access. Please login first.
- 403 Forbidden – Unauthorized access. Please check your permissions.
- 500 Internal Server Error – Unexpected error. Please check the response body for the stack trace.
Additional Resources
- See the Ceph RESTful API chapter in the Red Hat Ceph Storage Developer Guide for more details.