Querying the Brief List of Structuring Templates
Function
This API is used to query the brief list of structuring templates.
URI
GET /v3/{project_id}/lts/struct/customtemplate/list
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID. For details about how to obtain a project ID, see Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID. Minimum: 32 Maximum: 32 |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | User token obtained from IAM. For details about how to obtain a user token, see Obtaining a User Token. Minimum: 1000 Maximum: 2000 |
| Content-Type | Yes | String | Set this parameter to application/json;charset=UTF-8. Minimum: 30 Maximum: 30 |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| results | Array of BriefStructTemplateModel objects | Brief list of structuring templates. |
| Parameter | Type | Description |
|---|---|---|
| create_time | Long | Template creation/update time. |
| id | String | Template ID. |
| template_name | String | Template name. |
| template_type | String | Structuring type. The value can be regex (regular expression), json (JSON), nginx (Nginx), or split (delimiter). |
| project_id | String | Project ID. |
Status code: 401
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code. |
| error_msg | String | Error message. |
Example Requests
Obtaining 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 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: 401
Token authentication failed.
{
"error_code" : "LTS.0003",
"error_msg" : "Invalid token"
} Status Codes
| Status Code | Description |
|---|---|
| 200 | The request is successful. |
| 401 | Token authentication failed. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot