DescribeLogStoreTemplates
Updated at:2025-11-03
Description
Get logstore template list
Request
- Request syntax
Text
1POST /v3/bls?action=DescribeLogStoreTemplates HTTP/1.1
2Host: <Endpoint>
3Authorization: <Authorization String>
4Content-Type: application/json; charset=utf-8
5{
6 "name": <name>,
7 "pageNo": 1,
8 "pageSize": 10
9}
- Request headers
No additional headers are required beyond the standard request headers.
- Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| name | String | No | RequestBody | Filter by template name |
| orderBy | String | No | RequestBody | Sorting field, createdTime: Creation time, updatedTime: Update time, name: Name, priority: Priority. Default value: priority |
| order | String | No | RequestBody | Sorting method, asc: Ascending order, desc: Descending order, default value: desc |
| pageNo | Int | Yes | RequestBody | Page number, starting from 1 |
| pageSize | Int | Yes | RequestBody | Number of items per page, maximum: 100 |
Response
- Response headers
No additional headers are required beyond the standard response headers.
- Response parameters
| Field | Types | Description |
|---|---|---|
| success | Boolean | Whether the request succeeded |
| code | String | Request code, OK for success, or a specific error code for failure |
| message | String | Empty for request success, or a specific error message for request failure |
| templates | List<Template> | Template list |
| pageNo | Int | Page number |
| pageSize | Int | Number of items per page |
| totalCount | Int | Total |
The element structure of Template object is as follows:
| Field | Types | Description |
|---|---|---|
| name | String | Template name: Unique under the same user |
| projectPatterns | List<String> | Log group matching pattern: Supports * wildcard |
| logstorePatterns | List<String> | Logstore matching pattern: Supports * wildcard |
| priority | Int | Logstore template priority: Higher values indicate higher priority; unique under the same user |
| createdTimestamp | String | Creation time (UTC), Format: 2025-04-20T10:01:12Z |
| updatedTimestamp | String | Update time (UTC), Format: 2025-04-20T10:01:12Z |
Error code
No special error codes apart from standard error codes
Example
- Request example
Text
1POST /v3/bls?action=DescribeLogStoreTemplates HTTP/1.1
2Host: bls-log.bj.baidubce.com
3Authorization:bce-auth-v1/18717522d39411e9b721df098b0b908c/2019-09-10T07:00:20Z/1800/content-type;host;x-bce-date;x-bce-request-id/6a7cb6c9ac7ec156c805e55e7d0bcfc443b47feee97cf099c1c0d93a0b4c8304
4Content-Type: application/json; charset=utf-8
5{
6 // Filter by policy name: Optional
7 "name": "my-template",
8 // Sort field: Optional; default value: priority
9 // Optional values:
10 // priority - Priority
11 "orderBy": "priority",
12 // Sort order: Optional; default value: desc
13 // Optional values:
14 // asc - Ascending
15 // desc - Descending
16 "order": "desc",
17 // Page number: Starts from 1, required
18 "pageNo": 1,
19 // Page size: Required; maximum value: 100
20 "pageSize": 10
21}
- Response example
Text
1HTTP/1.1 201
2Content-Type: application/json; charset=utf-8
3X-Bce-Request-Id: 2eeba101-4cc7-4cfe-b5ac-a3be8d060e33
4Date: Fri, 10 Apr 2020 04:42:37 GMT
5{
6 "success": true,
7 "code": "OK", // Error code
8 "message": "", // Error details
9
10 // Logstore template list
11 "templates": [
12 {
13 "name": "my-template", // Template name
14 "projectPatterns": ["my-project-*"], // Log group matching pattern
15 "logstorePatterns": ["my-logstore-*"], // Logstore matching pattern
16 "priority": 10, // Logstore template priority
17 "createdTimestamp": "2025-04-20T10:01:12Z", // Creation time (UTC)
18 "updatedTimestamp": "2025-04-21T10:01:12Z", // Update time (UTC)
19 }
20 ],
21
22 "pageNo": 1, // Page number (starts from 1)
23 "pageSize": 10, // Page size
24 "totalCount": 100 // Total count
25}
