{
  "id": "availability",
  "title": "Database availability requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/bdbs/availability/",
  "summary": "REST API requests to check database availability",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-db-endpoint-availability) | `/v1/local/bdbs/{uid}/endpoint/availability` | Verifies local database endpoint availability |\n| [GET](#get-db-availability) | `/v1/bdbs/{uid}/availability` | Verifies database availability |\n\n## Get database endpoint availability {#get-db-endpoint-availability}\n\n```sh\nGET /v1/local/bdbs/{uid}/endpoint/availability\n```\n\nVerifies the local database endpoint is available. This request does not redirect to the primary node.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [view_bdb_info]() | admin\u003cbr /\u003ecluster_member\u003cbr /\u003ecluster_viewer\u003cbr /\u003edb_member\u003cbr /\u003edb_viewer\u003cbr /\u003euser_manager |\n\n### Request {#get-endpoint-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/local/bdbs/1/endpoint/availability\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database. |\n\n### Response {#get-endpoint-response}\n\nReturns the status code `200 OK` if the local database endpoint is available.\n\nIf the local database endpoint is unavailable, returns an error status code and a JSON object that contains `error_code` and `description` fields.\n\n### Error codes {#get-endpoint-error-codes}\n\nWhen errors are reported, the server may return a JSON object with\n`error_code` and `description` fields that provide additional information.\nThe following are possible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| no_quorum | Master healthcheck failed (no quorum in the cluster) |\n| db_not_found | Database does not exist in the cluster |\n| bdb_endpoint_unavailable | Local database endpoint is not available | \n\n### Status codes {#get-endpoint-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Database endpoint is available. |\n| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | Database endpoint is unavailable. |\n\n\n## Get database availability {#get-db-availability}\n\n```sh\nGET /v1/bdbs/{uid}/availability\n```\n\nGets the availability status of a database.\n\n- If the OSS Cluster API is enabled, verifies all endpoints for this database are available.\n\n- Otherwise, verifies the database has at least one available endpoint.\n\n### Permissions\n\n| Permission name | Roles |\n|-----------------|-------|\n| [view_bdb_info]() | admin\u003cbr /\u003ecluster_member\u003cbr /\u003ecluster_viewer\u003cbr /\u003edb_member\u003cbr /\u003edb_viewer\u003cbr /\u003euser_manager |\n\n### Request {#get-db-request}\n\n#### Example HTTP request\n\n```sh\nGET /v1/bdbs/1/availability\n```\n\n#### Headers\n\n| Key | Value | Description |\n|-----|-------|-------------|\n| Host | cnm.cluster.fqdn | Domain name |\n| Accept | application/json | Accepted media type |\n\n#### URL parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| uid | integer | The unique ID of the database. |\n\n### Response {#get-db-response}\n\nReturns the status code `200 OK` if the database is available.\n\nIf the database is unavailable, returns an error status code and a JSON object that contains `error_code` and `description` fields.\n\n### Error codes {#get-db-error-codes}\n\nWhen errors are reported, the server may return a JSON object with\n`error_code` and `description` fields that provide additional information.\nThe following are possible `error_code` values:\n\n| Code | Description |\n|------|-------------|\n| no_quorum | Master healthcheck failed (no quorum in the cluster) |\n| db_not_found | Database does not exist in the cluster |\n| bdb_unavailable | Database is not available | \n\n### Status codes {#get-db-status-codes}\n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | Database is available. |\n| [503 Service Unavailable](https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable) | Database is unavailable or doesn't have quorum. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

