Help Center/ Cloud Search Service/ API Reference/ API V2/ Logstash/ Delete a Custom Template V2
Updated on 2026-01-09 GMT+08:00

Delete a Custom Template V2

Function

This API is used to delete a custom template.

Calling Method

For details, see Calling APIs.

Authorization Information

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 Permissions Policies and Supported Actions for details on the required permissions.
  • 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

    Dependencies

    css:logstash:deleteConfTemplate

    Write

    cluster *

    • g:EnterpriseProjectId

    • g:ResourceTag/<tag-key>

    -

    -

URI

POST /v2.0/{project_id}/lgsconf/deletetemplate

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details about how to obtain the project ID and name, see Obtaining the Project ID and Name.

Constraints:

N/A

Value range:

Project ID of the account.

Default value:

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Template name.

Response Parameters

Status code: 200

Request succeeded.

None

Example Requests

Delete a custom template.

POST https://{Endpoint}/v2.0/{project_id}/lgsconf/deletetemplate

{
  "name" : "template1"
}

Example Responses

None

Status Codes

Status Code

Description

200

Request succeeded.

400

The request is invalid.

Do not retry the request without modifying it.

409

The request cannot be processed due to a conflict.

This status code indicates that the resource that the client attempts to create already exists, or the request failed to be processed because of the update of the conflict request.

412

The server did not meet one of the preconditions contained in the request.

Error Codes

See Error Codes.