| Anchor | ||||
|---|---|---|---|---|
|
Attribute | type | values | default | mandate | comment |
Name | String |
|
| True |
|
Description | string |
|
| False |
|
Items | collection |
|
|
|
|
Domains | collection |
|
|
|
|
| Anchor | ||||
|---|---|---|---|---|
|
Method:/messageTemplate/create
Parameters:
{
attrs:
{
'name':"localssosp",
'description':'xxx'
}
}
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Method:/messageTemplate /create
Parameters:
\{
id:templateid,
attrs:
\{
"domains":
\[
\{"id":did"\},
\{"id":did2"\},
\],
"items":
\{
"EMAIL_TOKEN":"...",
"SMS_TOKEN":"..."
\}
\}
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Parameters:
\{
"match":
\{
\["id","=", "tid"\]
\},
"return":\["*", "items"\],
\}
Response:
\{
"error":0,
"result":
\{
total:1,
rows:
\[
\{
"name":"xxx",
"description":"some description",
"items":
\{
"EMAIL_TOKEN":"...",
"SMS_TOKEN":"..."
\}
\\
\}
\]
\}
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
| Wiki Markup |
|---|
Parameters:
\{
"match":
\{
\["id","=", "tid"\]
\},
"return":\["*", "items"\],
\}
Response:
\{
"error":0,
"result":
\{
"name":"xxx",
"description":"some description",
"items":
\{
"EMAIL_TOKEN":"...",
"SMS_TOKEN":"..."
\}
\\
\}
\}
\\ |
| Anchor | ||||
|---|---|---|---|---|
|
Examples:
Method:/messageTemplate /getItem
Parameters:
{
id:templateid,
"itemName":"SMTP_OTP"
}
Response:
{
"error":0,
"result":"template in json string"
}
| Anchor | ||||
|---|---|---|---|---|
|
// 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":"..."
}
}
}
| Anchor | ||||
|---|---|---|---|---|
|