Deleting a Schema (a V3 API)
Function
This API is used to delete a specified schema.
URI
DELETE /v3/{project_id}/instances/{instance_id}/databases/{database_name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. |
| instance_id | Yes | String | DDM instance ID |
| database_name | Yes | String | Name of an existing schema. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| delete_dn_data | Yes | Boolean | Whether data stored on the associated DB instances is deleted. The value can be: |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 202
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Workflow ID. |
| database_name | String | Schema name |
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 Request
-
Deleting a schema (including the data stored on associated DB instances)
DELETE https://ddm.cn-southwest-2.myhuaweicloud.com/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/490030ecae1345b49c72b11a0812f99ain09/databases/db_b794?delete_dn_data=true
-
Deleting a schema (excluding the data stored on associated DB instances)
DELETE https://ddm.cn-southwest-2.myhuaweicloud.com/v3/74f57817ca8f42e19318eb0e0ad41d18/instances/490030ecae1345b49c72b11a0812f99ain09/databases/db_b794?delete_dn_data=false
Example Response
Status code: 202
OK
{
"job_id" : "075fabcf-c4f0-4dc3-a734-65449f5cd277",
"database_name" : "abc"
} Status code: 400
Bad request
{
"error_code" : "DBS.280001",
"error_msg" : "Parameter error."
} Status code: 500
Server error
{
"error_code" : "DBS.290015",
"error_msg" : "Failed to process the request."
} Status Codes
| Status Codes | Description |
|---|---|
| 202 | OK |
| 400 | Bad request |
| 500 | Server error |
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