{
  "id": "shards",
  "title": "Database shards requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/bdbs/shards/",
  "summary": "REST API requests for database shards",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-bdb-shards) | `/v1/bdbs/{bdb_uid}/shards` | Get the status of a database's shards |\n\n## Get database shards {#get-bdb-shards}\n\n\tGET /v1/bdbs/{int: bdb_uid}/shards\n\nGets the status for all shards that belong to the specified database.\n\n### Request {#get-request} \n\n#### Example HTTP request\n\n\tGET /v1/bdbs/1/shards?extra_info_keys=used_memory_rss\u0026extra_info_keys=connected_clients\n\n#### Request 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| bdb_uid | integer | The unique ID of the database. |\n\n### Response {#get-response} \n\nThe response body contains a JSON array with all shards, represented as [shard objects]().\n\n#### Example JSON body\n\n```json\n[\n    {\n        \"uid\": \"1\",\n\t\t\"role\": \"master\",\n\t\t\"assigned_slots\": \"0-8191\",\n        \"bdb_uid\": 1,\n        \"detailed_status\": \"ok\",\n        \"loading\": {\n            \"status\": \"idle\"\n        },\n        \"node_uid\": \"1\",\n        \"redis_info\": {\n\t\t\t\"connected_clients\": 14,\n            \"used_memory_rss\": 12460032\n        },\n        \"report_timestamp\": \"2024-09-13T15:28:10Z\",\n        \"status\": \"active\"\n    },\n    {\n        \"uid\": 2,\n        \"role\": \"slave\",\n        // additional fields...\n    }\n]\n```\n\n### Status codes {#get-status-codes} \n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. |\n| [404 Not Found](https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found) | bdb uid does not exist. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

