Updated on 2026-05-30 GMT+08:00

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}

Table 1 URI parameters

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.

Table 2 Query parameters

Parameter

Mandatory

Type

Description

delete_dn_data

Yes

Boolean

Whether data stored on the associated DB instances is deleted. The value can be:

  • true: indicates that the data stored on the associated DB instances is deleted.

  • false: indicates that the data stored on the associated DB instances is not deleted.

Request Parameters

Table 3 Request header 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

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

Workflow ID.

database_name

String

Schema name

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

Status code: 500

Table 6 Response body parameters

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.