Attributes

Attribute

type

values

default

mandate

comment

Name

String

 

 

True

 

Description

string

 

 

False

 

Items

collection

 

 

 

 

Domains

collection

 

 

 

 

/messageTemplate/create

Method:/messageTemplate/create
Parameters:
{
attrs:
{
'name':"localssosp",
'description':'xxx'
}
}

/messageTemplate/set

Method:/messageTemplate /create
Parameters:
{
id:templateid,
attrs:
{
"domains":
[
{"id":did"},
{"id":did2"},
],
"items":
{
"EMAIL_TOKEN":"...",
"SMS_TOKEN":"..."
}
}
}

/messageTemplate/search

Parameters:
{
"match":
{
["id","=", "tid"]
},
"return":["*", "items"],
}
Response:
{
"error":0,
"result":
{
total:1,
rows:
[
{
"name":"xxx",
"description":"some description",
"items":
{
"EMAIL_TOKEN":"...",
"SMS_TOKEN":"..."
}
}
]
}
}

/messageTemplate/get

Parameters:
{
"match":
{
["id","=", "tid"]
},
"return":["*", "items"],
}
Response:
{
"error":0,
"result":
{
"name":"xxx",
"description":"some description",
"items":
{
"EMAIL_TOKEN":"...",
"SMS_TOKEN":"..."
}
}
}

/messageTemplate /getItem


Examples:
Method:/messageTemplate /getItem
Parameters:
{
id:templateid,
"itemName":"SMTP_OTP"
}
Response:
{
"error":0,
"result":"template in json string"
}

/messageTemplate/update

// 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":"..."
}
}
}

/messageTemplate/delete




  • No labels