API Templates

AlarmTraq REST API formatting

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.

You can download this template from createAlertTenant2.json

AlarmTraq API Client uses JSON template files to format the HTTP Requests used to create/modify/close trouble tickets via REST API.

The following table lists the template variables that AlarmTraq recognizes:

Variable Name

Description

$Alarm_CallerID_Name Alarm Caller-ID Name sent to modem.
$Alarm_CallerID_Number Alarm Caller-ID Telephone Number sent to modem.

$Alarm_Code

Alarm Code such as ACT, RES, RST, CLR, or TST. 

$Alarm_Data

Alarm Data including the full alarm text as received by the switch.

$Alarm_Date

Alarm Date is the alarm date reported by the switch.

$Alarm_AlarmId

Alarm ID (index) number as used by the SQL record in the database.

$Alarm_MaintObjDescription

Alarm Maintenance Object Description is the complete alarm description as defined in the MO database

$Alarm_MaintObject

Alarm Maintenance Object Name is the MO reported by the switch

$Alarm_OnBoard

Alarm Onboard is either "y" or "n" for legacy systems or is an integer value reported by the switch.

$Alarm_RawData 

Alarm Raw Data is the complete alarm packet received by the switch

$Alarm_Time

Alarm Time is the alarm time reported by the switch. This time may be different due to different time zones

$Alarm_Type

Alarm Type is either "Major Alarm", Minor Alarm", or "Warning Message"

$Alarm_Server Alarm Server is the host name of the AlarmTraq server that received the alarm.
$Alarm_Port Alarm Port is either the modem port, 162 for SMNP traps or 443 for secure HTTPS.
$Alarm_WANIPAddress Alarm WAN IP Address as reported by originating router or device.
$Main_AlarmTraqVersion Displays the AlarmTraq version as 5.1.xxx

$Site_AccountNumber

Site Account Number as listed in the Site Profile

$Site_Name

Site Name as listed in the Site Profile

$Site_Notes Site Notes field as listed in the Site Profile

$Site_ProductID

Site Product ID as listed in the Site Profile

$Site_ReportGroupName

Site Report Group Name associated with this site.

$Site_ReportGroupNumber

Site Report Group Number 1-255 as listed in the Site Profile

$Site_SystemSoftVer

Site software version as listed in the Site Profile

$Site_SystemType

Site system type as listed in the Site Profile

$Site_TenantNumber

Site Tenant number 1-255 used by this system

$Web_AltProductIDLine Site Alternate Site ID as listed in the Site Profile (can be used for additional info)

$TimeStamp

The current UTC time

 

© 2020 Reilly Telecom Inc. All rights reserved.