Shard requests
REST API requests for database shards
This documentation applies to Redis Software versions 7.4.x.
Method |
Path |
Description |
GET |
/v1/shards |
Get all shards |
GET |
/v1/shards/{uid} |
Get a specific shard |
Get all shards
GET /v1/shards
Get information about all shards in the cluster.
Request
Example HTTP request
GET /shards?extra_info_keys=used_memory_rss&extra_info_keys=connected_clients
Key |
Value |
Description |
Host |
cnm.cluster.fqdn |
Domain name |
Accept |
application/json |
Accepted media type |
Query parameters
Field |
Type |
Description |
extra_info_keys |
list of strings |
A list of extra keys to be fetched (optional) |
Response
Returns a JSON array of shard objects.
Example JSON body
[
{
"uid": "1",
"role": "master",
"assigned_slots": "0-16383",
"bdb_uid": 1,
"detailed_status": "ok",
"loading": {
"status": "idle"
},
"node_uid": "1",
"redis_info": {
"connected_clients": 14,
"used_memory_rss": 12263424
},
"report_timestamp": "2024-06-28T18:44:01Z",
"status": "active"
},
{
"uid": 2,
"role": "slave",
// additional fields...
}
]
Status codes
Code |
Description |
200 OK |
No error. |
Get shard
GET /v1/shards/{int: uid}
Gets information about a single shard.
Request
Example HTTP request
GET /shards/1?extra_info_keys=used_memory_rss&extra_info_keys=connected_clients
Key |
Value |
Description |
Host |
cnm.cluster.fqdn |
Domain name |
Accept |
application/json |
Accepted media type |
URL parameters
Field |
Type |
Description |
uid |
integer |
The unique ID of the requested shard. |
Query parameters
Field |
Type |
Description |
extra_info_keys |
list of strings |
A list of extra keys to be fetched (optional) |
Response
Returns a shard object.
Example JSON body
{
"assigned_slots": "0-16383",
"bdb_uid": 1,
"detailed_status": "ok",
"loading": {
"status": "idle"
},
"node_uid": "1",
"redis_info": {
"connected_clients": 14,
"used_memory_rss": 12263424
},
"role": "master",
"report_timestamp": "2024-06-28T18:44:01Z",
"status": "active",
"uid": "1"
}
Status codes