Performing Operations on a GeminiDB Instance Database
Function
This function allows you to performing operations on a GeminiDB instance database.
Constraints
This API supports GeminiDB Redis instances.
URI
PUT /v3/{project_id}/instances/{instance_id}/databases
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 |
---|---|---|---|
action |
Yes |
String |
Operation on the instance: Flush: Delete data. |
db_id |
No |
Integer |
ID of the DB to be cleared. This parameter is valid only when action is set to Flush. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
job_id |
String |
Task ID |
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
- Clearing data in a specified database
PUT https://{endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/e73893ef73754465a8bd2e0857bbf13ein12/databases { "action" : "flush", "db_id" : 1 }
- Clearing all data
PUT https://{endpoint}/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/e73893ef73754465a8bd2e0857bbf13ein12/databases { "action" : "flush" }
Example Responses
Status code: 200
Accepted.
{ "job_id" : "04efe8e2-9255-44ae-a98b-d87cae411890" }
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