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.

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.

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.