Paginated query templates
Request address
- API address(requestURI): /openapi/v1/template/page
Request parameters
参数名称 | 类型 | 描述 |
---|---|---|
templateId | String | 模板id,长度不能超过20 |
createTimeStart | Date | 创建时间-开始 |
createTimeEnd | Date | 创建时间-结束 |
size | Long | 每页显示条数,默认10 |
current | Long | 当前页, 默认1 |
Sample request
{
"templateId": "12345",
"createTimeStart": "2024-01-01T00:00:00Z",
"createTimeEnd": "2024-01-31T23:59:59Z",
"size": 10,
"current": 1
}
Response parameters
Parameter name | Type | Description |
---|---|---|
records | List< T > | Query data list |
total | long | Total |
size | long | The number of articles displayed per page default is 10 |
current | long | On the current page, default is 1 |
pages | long | Total Pages |
hasPrevious | boolean | The presence of the previous |
hasNext | boolean | Whether there is a next page |
records data structures
Parameter name | Type | Description |
---|---|---|
id | String | Template id |
templateType | Integer | Template type, 1: SMS, 2: Mail |
content | String | Template content |
remark | String | Note |
createBy | String | Created by |
createTime | Date | Created |
updateBy | String | Updated by |
updateTime | Date | Updated on |
Sample response
{
"code": 200,
"msg": "success",
"data": {
"records": [
{
"id": "12345",
"templateType": 1,
"content": "Hello, {{name}}, your verification code is {{code}}." ,
"remark": "Used to register a verification code",
"createBy": "admin",
"createTime": "2024-01-01T10:00:00Z",
"updateBy": "admin",
"updateTime": "2024-01-02T12:00:00Z"
}
],
"total": 100,
"size": 10,
"current": 1,
"pages": 10,
"hasPrevious": false,
"hasNext": true
}
}