Search SMS Template¶
Query the SMS templates within this OU and the system OU.
Request Format¶
GET https://{apigw-address}/notification-center-service/v2.0/sms/templates
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Required/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Required |
String |
The OU ID. How to get orgId >> |
pageNo |
Query |
Optional |
Integer |
The request pages, starting from 1. |
pageSize |
Query |
Optional |
Integer |
Lists the page size in a request. When not specified, 10 records are displayed per page by default. The maximum records per page is 1,000, but for optimal performance, it is recommended to have not more than 50 records per page. |
Response Parameters¶
Name |
Data Type |
Description |
---|---|---|
data |
Items Struct and Pagination Struct |
|
Items Struct¶
Name |
Data Type |
Description |
---|---|---|
orgId |
String |
The OU ID of the SMS template. |
templateName |
String |
The name of the SMS template. |
templateCode |
String |
The SMS template ID. |
content |
String |
The content of the SMS template. |
parameters |
Array |
The parameter list of the SMS template. |
subject |
String |
The subject of the SMS template. |
Samples¶
Request Sample¶
url: https://{apigw-address}/notification-center-service/v2.0/sms/templates?action=get&orgId=yourOrgId&pageNo=2&pageSize=10
method: GET
Return Sample¶
{
"code":"0",
"msg":"OK",
"submsg":"",
"data":{
"items":[
{
"orgId":"yourorgId",
"templateName":"alarm-notification-1",
"templateCode":"alarm-notification-1",
"content":"$(INSTANCE) at $(START_TIME) has occurred $(DETAIL), please process ASAP.",
"parameters":[
"INSTANCE",
"START_TIME",
"DETAIL"
],
"subject":"Alarm Notification"
},
{
"orgId":"yourorgId",
"templateName":"alarm-notification-2",
"templateCode":"alarm-notification-2",
"content":"$(EVENT) occurred at $(TIME).
$(DETAIL)
Please verify it ASAP.",
"parameters":[
"EVENT",
"TIME",
"DETAIL"
],
"subject":"Alarm Notification"
},
{
"orgId":"yourorgId",
"templateName":"status-notification",
"templateCode":"status-notification",
"content":"$(SUMMARY)-$(START_TIME) Status: $(STATUS) $(DETAIL)",
"parameters":[
"SUMMARY",
"START_TIME",
"STATUS",
"DETAIL"
],
"subject":"Status Notification"
}
],
"pagination":{
"pageNo":"2",
"pageSize":"10",
"totalSize":"3"
}
},
"requestId":""
}