Skip to main content

Paginated query templates

Request address

  • API address(requestURI): /openapi/v1/template/page

Request parameters

参数名称类型描述
templateIdString模板id,长度不能超过20
createTimeStartDate创建时间-开始
createTimeEndDate创建时间-结束
sizeLong每页显示条数,默认10
currentLong当前页,默认1

Sample request

{
"templateId": "12345",
"createTimeStart": "2024-01-01T00:00:00Z",
"createTimeEnd": "2024-01-31T23:59:59Z",
"size": 10,
"current": 1
}

Response parameters

Parameter nameTypeDescription
recordsList< T >Query data list
totallongTotal
sizelongThe number of articles displayed per page default is 10
currentlongOn the current page, default is 1
pageslongTotal Pages
hasPreviousbooleanThe presence of the previous
hasNextbooleanWhether there is a next page

records data structures

Parameter nameTypeDescription
idStringTemplate id
templateTypeIntegerTemplate type, 1: SMS, 2: Mail
contentStringTemplate content
remarkStringNote
createByStringCreated by
createTimeDateCreated
updateByStringUpdated by
updateTimeDateUpdated 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
}
}