Download PDF
Download page Message Templates API Methods.
Message Templates API Methods
For Message Template objects, the configuration API supports List, and Get List Info methods, as well as retrieve a list of objects related to a Message.
Get Message Template List Info
Description: Gets metadata for a list of Message Templates configured for a client.
User Roles: Sysadmin or IT User
Method: GET /configuration/messageTemplates/info[?client={clientId}]
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
client | clientId | Integer (ID) | No | Restricts the list to entries that are specifically associated with a particular client. |
Body:
None
Response Code: 200 OK
Body:
Key or Attribute | Type | Mandatory? | Description |
---|---|---|---|
size | Integer | Yes | Total number of entries in the list. |
lastModified | DateTime | No | The last date & time that the list was updated. This information might not be available. This is formatted according to the definition of dateTime in the XML Schema specification. For JSON responses, it is represented as the number of milliseconds since midnight on January 1, 1970 (GMT). |
Get the metadata for a message template list
#Request (JSON)
GET /configuration/messageTemplates/info?client=4199
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response (JSON)
200 OK
Content-Type: application/json
{
"size": 64,
"lastModified": 1366821378000
}
Get Message Template Related Objects
Description: Retrieves the list of Services associated with a Message Template.
User Roles: Sysadmin or IT User
Method: GET /configuration/messageTemplates/{id}/related
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
id | messageTemplateId | Integer (ID) | Yes | Template ID of the Message for which you want to retrieve the list of related objects. |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
allServices | Boolean | No | If set to true , indicates that the Message Template is configured as the default Message Template for the Client. | ||||||||
service | Array | No | List of Service IDs associated with the Message Template.
| ||||||||
callFlowId | Integer (ID) | No | The Call Flow ID of the Message Template. | ||||||||
callFlow | String | No | The name of the Call Flow for the Message Template. |
Retrieve the list of objects associated with a Message Template
#Request (JSON)
GET /configuration/messageTemplates/13390/related
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response
200 OK
Content-Type: application/json
{
"allServices": null,
"service": [{"id": 42469}],
"callFlow": "A_MASTER_2",
"callFlowId": "2439"
}
List Message Template
Description: Lists Message templates configured for a client.
User Roles: Sysadmin or IT User
Method: GET /configuration/messageTemplates?[client={clientId}&]offset={n}&count={n}
Parameters:
Path/Query Parameter Name | Variable Name | Type | Mandatory? | Description |
---|---|---|---|---|
count | n | Integer | Yes | Specifies the number of items to return in the list. There is a hard cap of 1000 items. |
offset | n | Integer | Yes | Specifies the offset from 0, based on count, to start listing from. |
client | clientId | Integer (ID) | No | Restricts the list to entries that are specifically associated with this particular Client. |
Body:
None
Response Code: 200 OK
Body:
Key | Type | Mandatory? | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
next | URI | No | A URI for the next page of entries. If next is not present, or blank, then there are no pages after this one. | ||||||||||||||||
messageTemplate | Array | Yes | A container for a page of Message Template entries. The page size is controlled via count and offset in the request.
|
Get a list of Message Templates filtered by client
#Request (JSON)
GET /configuration/messageTemplates?client=4199&offset=0&count=20
Host: localhost.com
Content-Type: application/json
Accept: application/json
#Response (JSON)
200 OK
Content-Type: application/json
{
"messageTemplate": [
{
"messageId": 15298,
"templateId": 21789,
"description": "test A_MASTER for 41591"
},
{
"messageId": 843,
"templateId": 7553,
"description": "A_ID_ONLY_4 NOT IN USE"
},
...
{
"messageId": 975,
"templateId": 7047,
"description": "A_RPC_6 NOT IN USE"
},
{
"messageId": 13922,
"templateId": 20831,
"description": "INB_A_XFER_4 for service 43185"
}
],
"next": null
}