Attribute |
type |
values |
default |
mandate |
comment |
Name |
String |
|
|
True |
|
Description |
string |
|
|
False |
|
Items |
collection |
|
|
|
|
Domains |
collection |
|
|
|
|
Method:/messageTemplate/create
Parameters:
{
attrs:
{
'name':"localssosp",
'description':'xxx'
}
}
Method:/messageTemplate /create Parameters: \{ id:templateid, attrs: \{ "domains": \[ \{"id":did"\}, \{"id":did2"\}, \], "items": \{ "EMAIL_TOKEN":"...", "SMS_TOKEN":"..." \} \} \} \\ |
Parameters: \{ "match": \{ \["id","=", "tid"\] \}, "return":\["*", "items"\], \} Response: \{ "error":0, "result": \{ total:1, rows: \[ \{ "name":"xxx", "description":"some description", "items": \{ "EMAIL_TOKEN":"...", "SMS_TOKEN":"..." \} \\ \} \] \} \} \\ |
Parameters: \{ "match": \{ \["id","=", "tid"\] \}, "return":\["*", "items"\], \} Response: \{ "error":0, "result": \{ "name":"xxx", "description":"some description", "items": \{ "EMAIL_TOKEN":"...", "SMS_TOKEN":"..." \} \\ \} \} \\ |
Examples:
Method:/messageTemplate /getItem
Parameters:
{
id:templateid,
"itemName":"SMTP_OTP"
}
Response:
{
"error":0,
"result":"template in json string"
}
// this method is different with "set", it will append the items to the existing collection.
Method:/messageTemplate /update
Parameters:
{
id:templateid,
attrs:
{
"items":
{
"EMAIL_TOKEN":"..."
}
}
}