{
  "id": "shards",
  "title": "Shard requests",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/shards/",
  "summary": "REST API requests for database shards",
  "content": "\n| Method | Path | Description |\n|--------|------|-------------|\n| [GET](#get-all-shards) | `/v1/shards` | Get all shards |\n| [GET](#get-shard) | `/v1/shards/{uid}` | Get a specific shard |\n\n## Get all shards {#get-all-shards}\n\n\tGET /v1/shards\n\nGet information about all shards in the cluster.\n\n### Request {#get-all-request} \n\n#### Example HTTP request\n\n\tGET /v1/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#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| extra_info_keys | list of strings | A list of extra keys to be fetched (optional) |\n\n### Response {#get-all-response} \n\nReturns a JSON array of [shard objects]().\n\n#### Example JSON body\n\n```json\n[\n  {\n    \"uid\": \"1\",\n    \"role\": \"master\",\n    \"assigned_slots\": \"0-16383\",\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\t\t\t\"used_memory_rss\": 12263424\n\t\t},\n    \"report_timestamp\": \"2024-06-28T18:44:01Z\",\n    \"status\": \"active\"\n  },\n  {\n    \"uid\": 2,\n    \"role\": \"slave\",\n    // additional fields...\n  }\n]\n```\n\n### Status codes {#get-all-status-codes} \n\n| Code | Description |\n|------|-------------|\n| [200 OK](https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok) | No error. |\n\n## Get shard {#get-shard}\n\n\tGET /v1/shards/{int: uid}\n\nGets information about a single shard.\n\n### Request {#get-request} \n\n#### Example HTTP request\n\n\tGET /v1/shards/1?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| uid | integer | The unique ID of the requested shard. |\n\n#### Query parameters\n\n| Field | Type | Description |\n|-------|------|-------------|\n| extra_info_keys | list of strings | A list of extra keys to be fetched (optional) |\n\n### Response {#get-response} \n\nReturns a [shard object]().\n\n#### Example JSON body\n\n```json\n{\n  \"assigned_slots\": \"0-16383\",\n  \"bdb_uid\": 1,\n  \"detailed_status\": \"ok\",\n  \"loading\": {\n    \"status\": \"idle\"\n  },\n  \"node_uid\": \"1\",\n  \"redis_info\": {\n\t\t\"connected_clients\": 14,\n\t\t\"used_memory_rss\": 12263424\n\t},\n  \"role\": \"master\",\n  \"report_timestamp\": \"2024-06-28T18:44:01Z\",\n  \"status\": \"active\",\n  \"uid\": \"1\"\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) | Shard UID does not exist. |\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00",
  "children": [{"id":"actions","summary":"REST API requests to perform shard actions","title":"Shard actions requests","url":"https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/shards/actions/"},{"id":"stats","summary":"Shard statistics requests","title":"Shards stats requests","url":"https://redis.io/docs/latest/operate/rs/7.8/references/rest-api/requests/shards/stats/"}]
}

