Back to Redis

Shards

content/operate/rs/7.4/references/rest-api/requests/bdbs/shards.md

latest1.7 KB
Original Source
MethodPathDescription
GET/v1/bdbs/{bdb_uid}/shardsGet the status of a database's shards

Get database shards {#get-bdb-shards}

GET /v1/bdbs/{int: bdb_uid}/shards

Gets the status for all shards that belong to the specified database.

Request {#get-request}

Example HTTP request

GET /v1/bdbs/1/shards?extra_info_keys=used_memory_rss&extra_info_keys=connected_clients

Request headers

KeyValueDescription
Hostcnm.cluster.fqdnDomain name
Acceptapplication/jsonAccepted media type

URL parameters

FieldTypeDescription
bdb_uidintegerThe unique ID of the database.

Response {#get-response}

The response body contains a JSON array with all shards, represented as [shard objects]({{<relref "/operate/rs/7.4/references/rest-api/objects/shard">}}).

Example JSON body

json
[
    {
        "uid": "1",
		"role": "master",
		"assigned_slots": "0-8191",
        "bdb_uid": 1,
        "detailed_status": "ok",
        "loading": {
            "status": "idle"
        },
        "node_uid": "1",
        "redis_info": {
			"connected_clients": 14,
            "used_memory_rss": 12460032
        },
        "report_timestamp": "2024-09-13T15:28:10Z",
        "status": "active"
    },
    {
        "uid": 2,
        "role": "slave",
        // additional fields...
    }
]

Status codes {#get-status-codes}

CodeDescription
200 OKNo error.
404 Not Foundbdb uid does not exist.