Updated on 2026-01-08 GMT+08:00

Deleting a SQL Template

Function

This API is used to delete SQL templates in batches.

Authorization

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.

  • If you are using role/policy-based authorization, see the required permissions in Introduction.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependency

    dli:template:delete

    write

    template *

    -

    -

    -

URI

  • URI format

    POST /v1.0/{project_id}/sqls-deletion

  • Parameter description
    Table 1 URI parameter

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID, which is used for resource isolation. For details about how to obtain its value, see Obtaining a Project ID.

Request Parameters

Table 2 Request parameter

Parameter

Mandatory

Type

Description

sql_ids

Yes

Array<String>

IDs of SQL templates you want to delete.

Response Parameters

Table 3 Response parameters

Parameter

Type

Description

is_success

Boolean

Whether the request is successful.

message

String

System prompt. If execution succeeds, the message may be left blank. If the execution fails, the value will be the cause of the failure.

Example Request

Delete the SQL template whose ID is 27b79c50-4ac6-4050-8b81-8f0dbd7be184.

{
    "sql_ids": ["27b79c50-4ac6-4050-8b81-8f0dbd7be184"]
}

Example Response

{
  "is_success": true,
  "message": ""
}

Status Codes

Status Code

Description

200

OK

Error Codes

For details, see Error Codes.