Querying Big Keys of a GeminiDB Redis Instance
Function
This API is used to query big keys of a GeminiDB Redis instance.
Constraints
This API supports the following instances:
- GeminiDB Redis
URI
POST /v3/{project_id}/instances/{instance_id}/big-keys
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
instance_id |
Yes |
String |
Instance ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Index position. If offset is set to N, the resource query starts from the N+1 piece of data. The value must be no lower than 0. If this parameter is not transferred, offset is set to 0 by default, indicating that the query starts from the first big key. |
limit |
No |
Integer |
Maximum records to be queried. The value ranges from 1 to 100. If this parameter is not transferred, the first 100 records are queried by default. |
key_types |
No |
Array of strings |
Big key type. It is a character string list and supports six types such as strings, hashes, zsets, sets, lists, and streams. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
keys |
Array of Table 5 objects |
Queried big keys. |
count |
Integer |
Total big keys. |
Parameter |
Type |
Description |
---|---|---|
db_id |
Integer |
Database where a big key is located. |
key_type |
String |
Type of a big key. |
key_name |
String |
Name of a big key. |
key_size |
Integer |
Length of a big key. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Requests
POST https://{endpoint}/v3/instances/91b5c48e11bf4913b35814f28b8f79f2in12/big-keys { "key_types" : [ "string", "hash", "zset", "set", "list", "stream" ] }
Example Responses
Status code: 200
Success.
{ "keys" : [ { "db_id" : 0, "key_type" : "String", "key_name" : "a", "key_size" : 12 } ], "count" : 1 }
Status Codes
For details, see Status Codes.
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot