Trackunit API

<back to all web services

GetAlarm

The following routes are available for this service:
GET POST/GetAlarm
GET POST/GetAlarm/{Id}
GET/Alarm
GET/Alarm/{Id}
"use strict";
export class TemperatureAlarmLimits {
    /** @param {{temperature1LowerLimit?:number,temperature1UpperLimit?:number,temperature2LowerLimit?:number,temperature2UpperLimit?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    temperature1LowerLimit;
    /** @type {?number} */
    temperature1UpperLimit;
    /** @type {?number} */
    temperature2LowerLimit;
    /** @type {?number} */
    temperature2UpperLimit;
}
export class ADVoltageAlarmLimits {
    /** @param {{adVoltageLowerLimit?:number,adVoltageUpperLimit?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?number} */
    adVoltageLowerLimit;
    /** @type {?number} */
    adVoltageUpperLimit;
}
export class Location {
    /** @param {{latitude?:number,longitude?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    latitude;
    /** @type {number} */
    longitude;
}
export class TimeOfDay {
    /** @param {{hour?:number,minute?:number}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    hour;
    /** @type {number} */
    minute;
}
export class Alarm {
    /** @param {{id?:string,created?:string,name?:string,type?:string,enabled?:boolean,allUnits?:boolean,units?:string[],groups?:string[],emailRecipients?:string[],systemRecipients?:string[],smsRecipients?:string[],temperatureLimits?:TemperatureAlarmLimits,adVoltageLimits?:ADVoltageAlarmLimits,adVoltageInputIndex?:number,threshold?:number,batteryLevel?:number,location?:Location,radius?:number,inputIndex?:number,interval?:number,pointId?:string,expectedArrivalTime?:string,powerLevel?:number,weekdays?:string[],timeStart?:TimeOfDay,timeEnd?:TimeOfDay,zoneId?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
    /** @type {?string} */
    created;
    /** @type {string} */
    name;
    /** @type {string} */
    type;
    /** @type {?boolean} */
    enabled;
    /** @type {?boolean} */
    allUnits;
    /** @type {string[]} */
    units;
    /** @type {string[]} */
    groups;
    /** @type {string[]} */
    emailRecipients;
    /** @type {string[]} */
    systemRecipients;
    /** @type {string[]} */
    smsRecipients;
    /** @type {TemperatureAlarmLimits} */
    temperatureLimits;
    /** @type {ADVoltageAlarmLimits} */
    adVoltageLimits;
    /** @type {?number} */
    adVoltageInputIndex;
    /** @type {?number} */
    threshold;
    /** @type {?number} */
    batteryLevel;
    /** @type {Location} */
    location;
    /** @type {?number} */
    radius;
    /** @type {?number} */
    inputIndex;
    /** @type {?number} */
    interval;
    /** @type {string} */
    pointId;
    /** @type {?string} */
    expectedArrivalTime;
    /** @type {?number} */
    powerLevel;
    /** @type {string[]} */
    weekdays;
    /** @type {TimeOfDay} */
    timeStart;
    /** @type {TimeOfDay} */
    timeEnd;
    /** @type {string} */
    zoneId;
}
export class GetAlarmResponse {
    /** @param {{list?:Alarm[],responseStatus?:ResponseStatus}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {Alarm[]} */
    list;
    /** @type {ResponseStatus} */
    responseStatus;
}
export class GetAlarm {
    /** @param {{id?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    id;
}

JavaScript GetAlarm DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /GetAlarm HTTP/1.1 
Host: api.trackunit.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"id":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"list":[{"id":"String","created":"0001-01-01T00:00:00.0000000Z","name":"String","type":"String","enabled":false,"allUnits":false,"units":["String"],"groups":["String"],"emailRecipients":["String"],"systemRecipients":["String"],"smsRecipients":["String"],"temperatureLimits":{"temperature1LowerLimit":0,"temperature1UpperLimit":0,"temperature2LowerLimit":0,"temperature2UpperLimit":0},"adVoltageLimits":{"adVoltageLowerLimit":0,"adVoltageUpperLimit":0},"adVoltageInputIndex":0,"threshold":0,"batteryLevel":0,"location":{"latitude":0,"longitude":0},"radius":0,"inputIndex":0,"interval":0,"pointId":"String","expectedArrivalTime":"0001-01-01T00:00:00.0000000Z","powerLevel":0,"weekdays":["String"],"timeStart":{"hour":0,"minute":0},"timeEnd":{"hour":0,"minute":0},"zoneId":"String"}],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}