Updated on 2023-11-24 GMT+08:00

Deleting Audit Logs

API Description

This API is used to delete audit logs.

URI

  • URI format

    DELETE https://{Endpoint}/v3/{project_id}/instances/{instance_id}/auditlog

  • URI example

    https://dds.cn-north-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/3d39c18788b54a919bab633874c159dfin02/auditlog

Table 1 Request parameters

Name

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token obtained from IAM. For details, see Authentication.

project_id

Yes

String

Project ID of a tenant in a region. Obtain the project ID by following the instructions in Obtaining a Project ID.

instance_id

Yes

String

Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

Requests

  • Parameter description
    Table 2 Request body parameters

    Name

    Mandatory

    Type

    Description

    file_names

    Yes

    Array of strings

    File name list.

  • Example request
    {
      "file_names" : [
      "054bc9f81e80d2201fccc00b92ad6ec0_audit_log_65ca506de9904366bdf69ca8174250abin02_dda6bd25f6b043518f9574befabc9536no02_1660354924651", 
      "054bc9f81e80d2201fccc00b92ad6ec0_audit_log_65ca506de9904366bdf69ca8174250abin02_dda6bd25f6b043518f9574befabc9536no02_1660354987726" ]
    }

Responses

  • Parameter description
    Table 3 Response body parameters

    Name

    Type

    Description

    job_id

    String

    Task ID.

  • Example response
    { 
      "job_id" : "bf26cf3c-d046-4080-bb45-f114be7afa5f" 
    }

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.