Files
doc-exports/docs/ddm/api-ref/ddm_api_01_0116.html
wangdengke2 823df869a9 ddm_api
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2026-03-03 12:01:43 +00:00

12 KiB

Deleting a Schema (a V3 API)

Function

This API is used to delete a schema to release all its resources.

Constraints

None

URI

  • URL format

    DELETE /v3/{project_id}/instances/{instance_id}/databases/{database_name}?delete_dn_data={delete_dn_data}

  • Parameter description
    Table 1 Path parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID of a tenant in a region.

    instance_id

    Yes

    String

    DDM instance ID

    database_name

    Yes

    String

    Schema name

    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.

It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token.

Request

  • Request Parameters

    None

  • URI example
    • Deleting a schema (including the data stored on associated DB instances)
      DELETE https://{endpoint}/v3/{project_id}/instances/{instance_id}/databases/{database_name}?delete_dn_data=true
    • Deleting a schema (excluding the data stored on associated DB instances)
      DELETE https://{endpoint}/v3/{project_id}/instances/{instance_id}/databases/{database_name}?delete_dn_data=false

Response

  • Normal response
    Table 4 Response body parameters

    Parameter

    Type

    Description

    job_id

    String

    ID of the job for deleting a schema

    database_name

    String

    Schema name

  • Normal response example
    {
    "job_id": "eff1d289-xxxx-xxxx-8b9f-463ea07c000c",
     "database_name": "test"
    }

Status Codes

Error Codes

For details, see Error Codes.