Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Anchor
_Toc341972683
_Toc341972683
Attributes

Attribute

type

values

default

mandate

comment

Name

String

 

 

True

 

Description

string

 

 

False

 

Items

collection

 

 

 

 

Domains

collection

 

 

 

 

Anchor
_Toc341972684
_Toc341972684
/messageTemplate/create

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

Anchor
_Toc341972685
_Toc341972685
/messageTemplate/set

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

Anchor
_Toc341972686
_Toc341972686
/messageTemplate/search

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
_Toc341972687
_Toc341972687
/messageTemplate/get

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

Anchor
_Toc341972688
_Toc341972688
/messageTemplate /getItem


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

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

Anchor
_Toc341972690
_Toc341972690
/messageTemplate/delete