Help Center/ Log Tank Service/ API Reference/ APIs/ Cloud Log Structuring/ Querying the Brief List of Structuring Templates
Updated on 2025-08-21 GMT+08:00

Querying the Brief List of Structuring Templates

Function

This API is used to obtain the brief list of structuring templates. The brief list includes key information, such as fields, configurations, and IDs.

Calling Method

For details, see Calling APIs.

URI

GET /v3/{project_id}/lts/struct/customtemplate/list

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID. It can be obtained by calling an API or from the console. For details, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token obtained from IAM. For details about how to obtain it, see Obtaining a User Token.

Constraints:

N/A

Range

N/A

Default Value

N/A

Content-Type

Yes

String

Definition

Message body format. Set this parameter to application/json;charset=utf8.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

results

Array of BriefStructTemplateModel objects

Definition

Brief information about the queried custom structuring template.

Table 4 BriefStructTemplateModel

Parameter

Type

Description

create_time

Long

Definition

Time when the structuring template was created.

Range

N/A

id

String

Definition

ID of a custom structuring template.

Range

N/A

template_name

String

Definition

Name of a custom structuring template.

Range

N/A

template_type

String

Definition

Structuring template type.

Range

  • regex

  • json

  • split

  • nginx

  • built_in

  • custom_regex

  • regex_auto

project_id

String

Definition

Project ID.

Range

N/A

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Definition

Error code. For details, see Error Codes.

Range

N/A

error_msg

String

Definition

Error message.

Range

N/A

Example Requests

Obtain the brief list of structuring templates of the current tenant.

GET https://{endpoint}/v3/{project_id}/lts/struct/customtemplate/list

/v3/{project_id}/lts/struct/customtemplate/list

Example Responses

Status code: 200

The request is successful.

{
  "results" : [ {
    "create_time" : 1632897983441,
    "id" : "47629e46-287d-478c-8888-xxxxxxxxxxxx",
    "template_name" : "jsonTemplate",
    "template_type" : "json",
    "project_id" : "2a473356cca5487f8373be89xxxxxxxx"
  } ]
}

Status code: 500

The server has received the request but encountered an internal error.

{
  "error_code" : "LTS.2017",
  "error_msg" : "Find struct template failed."
}

Status Codes

Status Code

Description

200

The request is successful.

500

The server has received the request but encountered an internal error.

Error Codes

See Error Codes.