Help Center/ Cloud Search Service/ API Reference/ API V2/ Logstash/ Delete a Custom Template V2
Updated on 2025-08-15 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.

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.