AlarmTraq API Client uses JSON template files to format the HTTP Requests used to create/modify/close trouble tickets via a REST API. The JSON Template contains static JSON code and pre-defined variables (see below). When an alarm occurs AlarmTraq replaces these variables with the values contained in the alarm and customer records to produce the JSON payload of the HTTP Request.
AlarmTraq includes templates, suitable for most users’ needs, that eliminate the need to manually create a JSON-formatted payload containing the alarm information.
To publish a new API template, use a sample template located in the \AlarmTraq\Templates\API folder and change the settings.
AlarmTraq API templates have the following special characteristics:
- Template variables beginning with a dollar sign ($) that specify where parameter values should be substituted when AlarmTraq generates the JSON payload.
- JSON object and embed tags that follow the tag requirements of Microsoft Internet Explorer and Netscape Communicator or Navigator, respectively. To work correctly, you must follow these tag requirements.
The following example shows the createAlertTenant2.json file with the variables highlighted in red.