ALARMS
Overview
Use the Alarms API to:
- Get all alarms
- Get alarms history
- Get all active alarms
- Create an alarm
- Update an alarm
- Delete an alarm
The HTTP headers used to access all RTLS APIs are listed below. Before submitting requests to the Alarms API, set the following headers:
| Header Name |
Example Value |
Description |
| X-User-Email |
admin@example.com |
Email of the user performing HTTP requests to the API. |
| X-User-Token |
Drv3yU7PdyqUMtr89erZ |
Token allowing user access to the API. |
| X-User-Project |
OfOgUA4kTs2HrmYYlFw6Jg |
Project identifier. Value of the project.uid field. |
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the email address returned in the response, set:
X-USER-EMAIL = data.email
Send a request to log in using POST api/auth/log_in.json described in the Auth API. Using the authentication token returned in the response, set:
X-USER-TOKEN = data.token
Send a request to get projects using GET api/projects/ described in the Projects API. You must send this request with headers X-USER-EMAIL and X-USER-TOKEN already set. Using the project UID returned in the response, set:
X-USER-PROJECT = projects[i].uid
Alarms Endpoints
Endpoints
Get alarms
GET api/alarms
Get all alarms. Returns all current alarms that have not been cleared.
Response Fields
| Field |
Description |
| mac_address |
The MAC address of the node that alarmed. |
| alarm_name |
The name of the alarm type: - zone_violation
- buffer_violation
- emergency_button
- pws_safety
- uncertified_operation**
** Addon rtls-addon-vehicle-certification is required |
| additional_info |
A JSON object with information about the alarm (depends on alarm type). |
| acknowledged |
Reserved field. |
| acknowledged_by |
Reserved field. |
| created_at |
The time when the alarm was triggered, in UTC. |
| updated_at |
The time when the alarm information was last updated, in UTC. |
| alarm_type_id |
The numeric identifier of the alarm type in the context of the server: - 2 - zone alarms
- 6 - emergency call button was pressed
- 8 - buffer alarms
- 9 - pws safety alarms
- 10 - uncertified operation**
** Addon rtls-addon-vehicle-certification is required |
| hysteresis_count |
The number of alarm publications. |
| state |
The current state of the alarm:- set - The alarm has been triggered and is currently alarming.
|
| uid |
The unique identifier of the alarm. |
| zone_uid |
The unique identifier of the zone or buffer, if the alarm is a zone violation or a buffer violation. |
| ts |
The timstamp when the trackable triggered the alarm. |
| sublocation_uid |
The unique identifier of the area. |
| x |
The x-coordinate of the position of the trackable when it triggered the alarm. |
| y |
The y-coordinate of the position of the trackable when it triggered the alarm. |
| z |
The z-coordinate of the position of the trackable when it triggered the alarm. |
| obj_uid |
The unique identifier of the trackable that triggered the alarm. |
| Field |
Description |
| additional_info.zone_alarm_level |
The severity level of the zone violation alarm, if the alarm is a zone violation. The severity level range is from 1-4, where one is the least severe and 4 is most severe. |
| additional_info.text |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_violation_type |
The type of zone violation, if the alarm is a zone violation: |
| additional_info.zone_uid |
The unique identifier of the zone, if the alarm is a zone violation. |
additional_info (pws_safety)
| Field |
Description |
| additional_info.distance |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
Text name of the reported trackable. |
| additional_info.category |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
The name of the contacted trackable object. |
| additional_info.contact_category |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Description |
| text |
The alarm text |
| duration |
The alarm duration in seconds |
| refNumber |
Alarm sequence number in hex |
| reason |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
Example Response
{
"alarms": [
{
"mac_address": "e4956ea40603",
"alarm_name": "zone_violation",
"additional_info": {
"zone_alarm_level": 1,
"text": "Keep in zone ZoneA with zone alarm level 1",
"zone_violation_type": "keep_in",
"zone_uid": "auEbCGexShi14TfSmGs1kw"
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2018-05-18T15:12:58.289Z",
"updated_at": "2018-05-18T15:13:00.234Z",
"alarm_type_id": 2,
"hysteresis_count": 2,
"state": "set",
"uid": "L46pA66VStKXYbTvRCD3Xw",
"zone_uid": "auEbCGexShi14TfSmGs1kw",
"obj_uid": "4rmlQ4bGTsGkt1rKFY0k_A",
"ts": "2018-07-27T11:32:01.327Z",
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"x": 1000,
"y": 15620,
"z": 1088
},
{
"mac_address": "000000000027",
"alarm_name": "pws_safety",
"additional_info": {
"distance": 5000,
"category": "PERSON",
"name": "TO-16",
"contact_category": "VEHICLE",
"contact_name": "TO-17",
"contact_uid": "dAA305qLQ_2DWi3A6H8kUg",
"contact_x": 62700,
"contact_y": -29500,
"contact_sl_uid": "2Mb9auXPSO_2C739PId0zQ"
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2020-09-28T12:47:26.000Z",
"updated_at": "2020-09-28T12:48:26.334Z",
"alarm_type_id": 9,
"hysteresis_count": 1,
"state": "set",
"uid": "Ybv8VaA1TAmo71BaI6xHXQ",
"zone_uid": "dAA305qLQ_2DWi3A6H8kUg",
"ts": "2020-09-28T12:47:26.000Z",
"x": 60500,
"y": -31800,
"z": 0,
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"obj_uid": "f86LqFGPSyyjfkPAY5WPdQ"
}
]
}
Get alarm history
GET api/alarms?from={timestamp in milliseconds}&to={timestamp in milliseconds}&format={csv|json}&obj_uid[]={obj_uid}&sublocation_uid={sublocation_uid}&location_uid={location_uid}&alarm_type_name[]={alarm_type_name}
Get alarms history data in a different format. In case of format parameter not specified the output is a zip file. The zip file contains a .csv file.
Request Fields
| Field |
Required/Optional |
Type |
Description |
| from |
required |
number |
The time stamp of the beginning of the time frame on which to be reported, in milliseconds. |
| to |
required |
number |
The time stamp of the end of the time frame on which to be reported, in milliseconds. |
| format |
optional |
string |
Supporting two output formats csv and json, default the output is archived csv. In case the scv or json format is setting up in query the request timeframe interval is limited with the two days. |
| obj_uid |
optional |
string |
The list of unique identifier of the trackable that triggered the alarm. |
| sublocation_uid |
optional |
string |
The unique identifier of the area. |
| location_uid |
optional |
string |
The unique identifier of the site. |
| alarm_type_name |
optional |
string |
The list of alarm type names:- zone_violation
- buffer_violation
- emergency_button
- pws_safety
|
Response Fields
The table in the .csv file and json output format contains the following fields:
created_at,updated_at,additional_info,alarm_type_id,state,obj_id,zone_uid,project_uid,ts,sublocation_uid,x,y,z
| Column |
Description |
| created_at |
The time stamp of alarm creation. |
| updated_at |
The time stamp of alarm updating. |
| additional_info |
The alarm info. |
| alarm_type_id |
The numeric identifier of the alarm type in the context of the server: - 2 - zone alarms
- 6 - emergency call button was pressed
- 8 - buffer alarms
- 9 - pws safety alarms
- 10 - uncertified operation**
** Addon rtls-addon-vehicle-certification is required |
| x |
The x coordinate of the position where the trackable triggered the alarm. |
| y |
The y coordinate of the position where the trackable triggered the alarm. |
| z |
The z coordinate of the position where the trackable triggered the alarm. |
| sublocation_uid |
The unique identifier of the area. |
| obj_id |
The unique identifier of the trackable that triggered the alarm. |
| state |
The alarm state. |
| zone_uid |
The unique identifier of the zone. |
| project_uid |
The unique identifier of the project. |
| ts |
The alarm's time stamp. |
| Field |
Description |
| additional_info.zone_alarm_level |
The severity level of the zone violation alarm, if the alarm is a zone violation. The severity level range is from 1-4, where one is the least severe and 4 is most severe. |
| additional_info.text |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_violation_type |
The type of zone violation, if the alarm is a zone violation: |
| additional_info.zone_uid |
The unique identifier of the zone, if the alarm is a zone violation. |
additional_info (pws_safety)
| Field |
Description |
| additional_info.distance |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
Text name of the reported trackable. |
| additional_info.category |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
The name of the contacted trackable object. |
| additional_info.contact_category |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Description |
| text |
The alarm text |
| duration |
The alarm duration in seconds |
| refNumber |
Alarm sequence number in hex |
| reason |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
| clear_x |
The x coordinate of the vehicle when alarm was cleared |
| clear_y |
The y coordinate of the vehicle when alarm was cleared |
| clear_z |
The z coordinate of the vehicle when alarm was cleared |
| clear_sublocation_uid |
The area uid of the vehicle coordinate when alarm was cleared |
Example Request csv
GET /api/alarms?from=1600819200000&to=1600905600000&format=csv&alarm_type_name[]=zone_violation&sublocation_uid=2Mb9auXPSO_2C739PId0zQ
Example Response csv
csv
created_at,updated_at,additional_info,alarm_type_id,state,obj_id,zone_uid,project_uid,ts,sublocation_uid,x,y,z
2020-09-14T16:25:08.219Z,2020-09-25T11:11:01.795Z,"{""text"":""Keep out zone Zone Alarm Test with zone alarm level 1"",""zone_alarm_level"":1,""zone_uid"":""U8_BpxuuTW6eREw1fKKZpA"",""zone_violation_type"":""keep_out""}",2,set,mpCc31CSQoyZH-Fmvajwsg,U8_BpxuuTW6eREw1fKKZpA,VMKRetiPRDKm0zUHDQ5x6g,2020-09-14T16:25:08.219Z,2Mb9auXPSO_2C739PId0zQ,4000,3720,1000
2020-09-14T16:25:04.212Z,2020-09-25T11:11:01.772Z,"{""text"":""Keep out zone Zone Alarm Test with zone alarm level 1"",""zone_alarm_level"":1,""zone_uid"":""U8_BpxuuTW6eREw1fKKZpA"",""zone_violation_type"":""keep_out""}",2,set,UvJD7Me8Txiv1Br47WTYlA,U8_BpxuuTW6eREw1fKKZpA,VMKRetiPRDKm0zUHDQ5x6g,2020-09-14T16:25:04.212Z,2Mb9auXPSO_2C739PId0zQ,1000,15520,1000
Example Request json
GET /api/alarms?from=1600819200000&to=1600905600000&format=json&alarm_type_name[]=zone_violation&sublocation_uid=2Mb9auXPSO_2C739PId0zQ
Example Response json
{
"alarms": [
{
"created_at": "2020-09-14T16:25:08.219Z",
"updated_at": null,
"additional_info": {
"text": "Keep out zone Zone Alarm Test with zone alarm level 1",
"zone_alarm_level": 1,
"zone_uid": "U8_BpxuuTW6eREw1fKKZpA",
"zone_violation_type": "keep_out"
},
"alarm_type_id": 2,
"alarm_name": "zone_violation",
"state": "set",
"obj_id": "mpCc31CSQoyZH-Fmvajwsg",
"zone_uid": "U8_BpxuuTW6eREw1fKKZpA",
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"project_uid": "VMKRetiPRDKm0zUHDQ5x6g",
"x": 4000,
"y": 3720,
"z": 1000
},
{
"created_at": "2020-09-14T16:25:04.212Z",
"updated_at": null,
"additional_info": {
"text": "Keep out zone Zone Alarm Test with zone alarm level 1",
"zone_alarm_level": 1,
"zone_uid": "U8_BpxuuTW6eREw1fKKZpA",
"zone_violation_type": "keep_out"
},
"alarm_type_id": 2,
"alarm_name": "zone_violation",
"state": "set",
"obj_id": "UvJD7Me8Txiv1Br47WTYlA",
"zone_uid": "U8_BpxuuTW6eREw1fKKZpA",
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"project_uid": "VMKRetiPRDKm0zUHDQ5x6g",
"x": 1000,
"y": 15520,
"z": 1000
},
{
"mac_address": "000000000027",
"alarm_name": "pws_safety",
"additional_info": {
"distance": 5000,
"category": "PERSON",
"name": "TO-16",
"contact_category": "VEHICLE",
"contact_name": "TO-17",
"contact_uid": "dAA305qLQ_2DWi3A6H8kUg",
"contact_x": 62700,
"contact_y": -29500,
"contact_sl_uid": "2Mb9auXPSO_2C739PId0zQ"
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2020-09-28T12:47:26.000Z",
"updated_at": "2020-09-28T12:48:26.334Z",
"alarm_type_id": 9,
"hysteresis_count": 1,
"state": "set",
"uid": "Ybv8VaA1TAmo71BaI6xHXQ",
"zone_uid": "dAA305qLQ_2DWi3A6H8kUg",
"ts": "2020-09-28T12:47:26.000Z",
"x": 60500,
"y": -31800,
"z": 0,
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"obj_id": "f86LqFGPSyyjfkPAY5WPdQ"
}
]
}
Get active alarms
GET api/alarms/active
Get all active alarms. Returns all current alarms that have not been cleared.
Response Fields
| Field |
Description |
| mac_address |
The MAC address of the node that alarmed. |
| alarm_name |
The name of the alarm type: - zone_violation
- buffer_violation
- emergency_button
- pws_safety
- uncertified_operation**
** Addon rtls-addon-vehicle-certification is required |
| additional_info |
A JSON object with information about the alarm (depends on alarm type). |
| acknowledged |
Reserved field. |
| acknowledged_by |
Reserved field. |
| created_at |
The time when the alarm was triggered, in UTC. |
| updated_at |
The time when the alarm information was last updated, in UTC. |
| alarm_type_id |
The numeric identifier of the alarm type in the context of the server: - 2 - zone alarms
- 6 - emergency call button was pressed
- 8 - buffer alarms
- 9 - pws safety alarms
- 10 - uncertified operation**
** Addon rtls-addon-vehicle-certification is required |
| hysteresis_count |
The number of alarm publications. |
| state |
The current state of the alarm:- set - The alarm has been triggered and is currently alarming.
- clear - The alarm has been cleared and is no longer alarming.
|
| uid |
The unique identifier of the alarm. |
| zone_uid |
The unique identifier of the zone or buffer, if the alarm is a zone violation or a buffer violation. |
| sublocation_uid |
The unique identifier of the area. |
| ts |
The timstamp when the trackable triggered the alarm. |
| x |
The x-coordinate of the position of the trackable when it triggered the alarm. |
| y |
The y-coordinate of the position of the trackable when it triggered the alarm. |
| z |
The z-coordinate of the position of the trackable when it triggered the alarm. |
| obj_uid |
The unique identifier of the trackable that triggered the alarm. |
| Field |
Description |
| additional_info.zone_alarm_level |
The severity level of the zone violation alarm, if the alarm is a zone violation. The severity level range is from 1-4, where one is the least severe and 4 is most severe. |
| additional_info.text |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_violation_type |
The type of zone violation, if the alarm is a zone violation: |
| additional_info.zone_uid |
The unique identifier of the zone, if the alarm is a zone violation. |
additional_info (pws_safety)
| Field |
Description |
| additional_info.distance |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
Text name of the reported trackable. |
| additional_info.category |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
The name of the contacted trackable object. |
| additional_info.contact_category |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Description |
| text |
The alarm text |
| duration |
The alarm duration in seconds |
| refNumber |
Alarm sequence number in hex |
| reason |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
Example Response
{
"alarms": [
{
"mac_address": "000000005",
"alarm_name": "zone_violation",
"additional_info": {
"text": "This is a test",
"zone_violation_type": "keep_out",
"zone_uid": "1111111111111111111111"
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2017-06-27T11:51:36.000Z",
"updated_at": "2017-06-27T11:51:36.000Z",
"alarm_type_id": 2,
"hysteresis_count": 1,
"state": "set",
"obj_id": "DekTq5B-R1O37-WvwgYcOQ",
"uid": "MMpQJoJsQSi3wDOr_V1Xtw",
"ts": "2018-07-27T11:32:01.327Z",
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"x": 1000,
"y": 15620,
"z": 1088
},
{
"mac_address": "000000000027",
"alarm_name": "pws_safety",
"additional_info": {
"distance": 5000,
"category": "PERSON",
"name": "TO-16",
"contact_category": "VEHICLE",
"contact_name": "TO-17",
"contact_uid": "dAA305qLQ_2DWi3A6H8kUg",
"contact_x": 62700,
"contact_y": -29500,
"contact_sl_uid": "2Mb9auXPSO_2C739PId0zQ"
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2020-09-28T12:47:26.000Z",
"updated_at": "2020-09-28T12:48:26.334Z",
"alarm_type_id": 9,
"hysteresis_count": 1,
"state": "set",
"uid": "Ybv8VaA1TAmo71BaI6xHXQ",
"zone_uid": "dAA305qLQ_2DWi3A6H8kUg",
"ts": "2020-09-28T12:47:26.000Z",
"x": 60500,
"y": -31800,
"z": 0,
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"obj_id": "f86LqFGPSyyjfkPAY5WPdQ"
}
]
}
Create alarm
POST api/alarms
Create an alarm.
Request Fields
| Field |
Required/Optional |
Values |
Type |
Description |
| alarm_name |
required |
- zone_violation
- buffer_violation
- emergency_button
- pws_safety
- uncertified_operation**
** Addon rtls-addon-vehicle-certification is required |
string |
The name of the alarm type. |
| additional_info |
required |
- |
object |
A JSON object that includes info about the alarm. |
| state |
required |
|
string |
The state of the alarm.- set - The alarm has been triggered and is currently alarming.
- clear - The alarm has been cleared and is no longer alarming.
|
| obj_class |
required |
|
string |
The node type.- WIN - anchor or bridge
- TO - trackable
|
| obj_uid |
required |
- |
string |
The unique identifier of the trackable object. To retrieve a trackable UID, use GET api/trackable_objects described in the Trackable Objects API |
| ts |
optional |
- |
number |
The timestamp part of position of the trackable when it triggered the alarm, in seconds. |
| ms |
optional |
- |
number |
The timestamp part of position of the trackable when it triggered the alarm, in milliseconds. |
| sublocation_uid |
optional |
- |
string |
The unique identifier of the area where alarm was triggered. |
| x |
optional |
- |
number |
The x-coordinate of the position of the trackable when it triggered the alarm. |
| y |
optional |
- |
number |
The y-coordinate of the position of the trackable when it triggered the alarm. |
| z |
optional |
- |
number |
The z-coordinate of the position of the trackable when it triggered the alarm. |
| Field |
Required/Optional |
Values |
Type |
Description |
| additional_info.zone_alarm_level |
required |
1-4 |
number |
The severity level of the alarm, if the alarm is a zone violation (optional for emergency_button). |
| additional_info.text |
optional |
- |
string |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_uid |
required |
- |
string |
The unique identifier for the zone (optional for emergency_button). To retrieve a zone UID, use GET api/zones described in the Zones API. |
| additional_info.zone_alarm_type |
optional |
- |
string |
Note: If you want to trigger a visual and audible alarm using the node hardware, delete this line in the request. |
additional_info (pws_safety)
| Field |
Required/Optional |
Values |
Type |
Description |
| additional_info.distance |
optional |
- |
number |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
optional |
- |
string |
Text name of the reported trackable. |
| additional_info.category |
optional |
- |
string |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
optional |
- |
string |
The name of the contacted trackable object. |
| additional_info.contact_category |
optional |
- |
string |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
optional |
- |
string |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
optional |
- |
number |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
optional |
- |
number |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
optional |
- |
string |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Required/Optional |
Values |
Type |
Description |
| additional_info.text |
optional |
- |
number |
The alarm text |
| additional_info.duration |
optional |
- |
number |
The alarm duration in seconds |
| additional_info.refNumber |
optional |
- |
string |
Alarm sequence number in hex |
| additional_info.reason |
optional |
- |
string |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
| additional_info.clear_x |
optional |
- |
number |
The x coordinate of the vehicle when alarm was cleared |
| additional_info.clear_y |
optional |
- |
number |
The y coordinate of the vehicle when alarm was cleared |
| additional_info.clear_z |
optional |
- |
number |
The z coordinate of the vehicle when alarm was cleared |
| additional_info.clear_sublocation_uid |
optional |
- |
string |
The area uid of the vehicle coordinate when alarm was cleared |
Response Fields
| Field |
Description |
| additional_info |
A JSON object with information about the alarm (depends on alarm type). |
| acknowledged |
Reserved field. |
| acknowledged_by |
Reserved field. |
| created_at |
The time when the alarm was created, in UTC. |
| updated_at |
The time when the alarm was last updated, in UTC. |
| hysteresis_count |
The number of alarm publications. |
| state |
The state of the alarm:- set - The alarm has been triggered and is currently alarming.
- clear - The alarm has been cleared and is no longer alarming.
|
| obj_uid |
The unique identifier of the trackable object. |
| mac_address |
The MAC address of the node. |
| alarm_name |
The name of the alarm type: - zone_violation
- buffer_violation
- emergency_button
- pws_safety
- uncertified_operation**
** Addon rtls-addon-vehicle-certification is required |
| uid |
The unique identifier of the alarm. |
| ts |
The timestamp part of position of the trackable when it triggered the alarm, in seconds. |
| ms |
The timestamp part of position of the trackable when it triggered the alarm, in milliseconds. |
| sublocation_uid |
The unique identifier of the area. |
| x |
The x-coordinate of the position of the trackable when it triggered the alarm. |
| y |
The y-coordinate of the position of the trackable when it triggered the alarm. |
| z |
The z-coordinate of the position of the trackable when it triggered the alarm. |
| Field |
Description |
| additional_info.zone_alarm_level |
The severity level of the zone violation alarm, if the alarm is a zone violation. The severity level range is from 1-4, where one is the least severe and 4 is most severe. |
| additional_info.text |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_violation_type |
The type of zone violation, if the alarm is a zone violation: |
| additional_info.zone_uid |
The unique identifier of the zone, if the alarm is a zone violation. |
additional_info (pws_safety)
| Field |
Description |
| additional_info.distance |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
Text name of the reported trackable. |
| additional_info.category |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
The name of the contacted trackable object. |
| additional_info.contact_category |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Description |
| text |
The alarm text |
| duration |
The alarm duration in seconds |
| refNumber |
Alarm sequence number in hex |
| reason |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
| clear_x |
The x coordinate of the vehicle when alarm was cleared. The field is present in response only for cleared alarms |
| clear_y |
The y coordinate of the vehicle when alarm was cleared. The field is present in response only for cleared alarms |
| clear_z |
The z coordinate of the vehicle when alarm was cleared. The field is present in response only for cleared alarms |
| clear_sublocation_uid |
The area uid of the vehicle coordinate when alarm was cleared. The field is present in response only for cleared alarms |
Request Example
{
"alarm_name": "zone_violation",
"additional_info": {
"zone_uid": "NinKMbZh39954JXAXMOdEC",
"zone_alarm_level": 3
},
"state": "set",
"obj_uid": "zoCQvGooJdYm8iYaT9mQAU",
"obj_class":"TO",
"ts": 1532691121,
"ms": 327,
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"x": 1000,
"y": 15620,
"z": 1088
}
Response Example
{
"alarm": {
"additional_info": {
"zone_uid": "NinKMbZh39954JXAXMOdEC",
"zone_alarm_level": 3
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2017-06-27T12:01:44.000Z",
"updated_at": "2017-06-27T12:03:02.000Z",
"alarm_type_id": 2,
"hysteresis_count": 3,
"state": "set",
"obj_uid": "zoCQvGooJdYm8iYaT9mQAU",
"uid": "bmahpWu0S6KwBoBaHooKIw",
"zone_uid": "U8_BpxuuTW6eREw1fKKZpA",
"mac_address": "000000005",
"project_uid": "_2E2DIF5SAemIHbnIhLbGg",
"alarm_name": "zone_violation",
"ts": 1532691121,
"ms": 327,
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"x": 1000,
"y": 15620,
"z": 1088
}
}
Errors
| Error Status |
Error Type |
Error Body |
Error Description |
| 404 |
Not found |
{"message":"Association not found", "name":"NotFoundError"} |
Could not find an association by using this obj_uid. |
| 422 |
Unprocessable Entity |
{"message":"Wrong object class(TO, WIN)", "name":"UnprocessableEntityError"} |
The wrong object type was specified in the request. |
| 422 |
Unprocessable Entity |
{"message":"Invalid alarm state", "name":"UnprocessableEntityError"} |
The wrong alarm state was specified in the request. |
| 422 |
Unprocessable Entity |
{"message":"You need specify field obj_uid", "name":"UnprocessableEntityError"} |
The obj_uid field was not specified. |
Update alarm
POST api/alarms/{uid}
Update an alarm using a specified alarm UID. To find an alarm UID, see get alarms.
Request Fields
| Field |
Required/Optional |
Values |
Type |
Description |
| alarm_name |
required |
- zone_violation
- buffer_violation
- emergency_button
- pws_safety
- uncertified_operation**
** Addon rtls-addon-vehicle-certification is required |
string |
The name of the alarm type. |
| additional_info |
required |
- |
object |
A JSON object with additional info about the alarm zone. |
| hysteresis_count |
optional |
- |
number |
The number of alarm publications. |
| state |
required |
|
string |
The state of the alarm:- set - The alarm has been triggered and is currently alarming.
- clear - The alarm has been cleared and is no longer alarming.
|
| obj_class |
required |
|
string |
The node type:- WIN - anchor or bridge
- TO - trackable
|
| obj_uid |
required |
- |
string |
The unique identifier of the trackable object. To retrieve a trackable UID, use 'GET api/trackable_objects` |
| ts |
optional |
- |
number |
The timestamp part of position of the trackable when it triggered the alarm, in seconds. |
| ms |
optional |
- |
number |
The timestamp milliseconds part of position of the trackable when it triggered the alarm, in milliseconds. |
| sublocation_uid |
optional |
- |
string |
The unique identifier of the area. |
| x |
optional |
- |
number |
The x-coordinate of the position of the trackable when it triggered the alarm. |
| y |
optional |
- |
number |
The y-coordinate of the position of the trackable when it triggered the alarm. |
| z |
optional |
- |
number |
The z-coordinate of the position of the trackable when it triggered the alarm. |
| Field |
Required/Optional |
Values |
Type |
Description |
| additional_info.zone_alarm_level |
required |
1-4 |
number |
The severity level of the alarm, if the alarm is a zone violation (optional for emergency_button). |
| additional_info.text |
optional |
- |
string |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_uid |
required |
- |
string |
The unique identifier for the zone (optional for emergency_button). To retrieve a zone UID, use GET api/zones described in the Zones API. |
| additional_info.zone_alarm_type |
optional |
- |
string |
Note: If you want to trigger a visual and audible alarm using the node hardware, delete this line in the request. |
additional_info (pws_safety)
| Field |
Required/Optional |
Values |
Type |
Description |
| additional_info.distance |
optional |
- |
number |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
optional |
- |
string |
Text name of the reported trackable. |
| additional_info.category |
optional |
- |
string |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
optional |
- |
string |
The name of the contacted trackable object. |
| additional_info.contact_category |
optional |
- |
string |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
optional |
- |
string |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
optional |
- |
number |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
optional |
- |
number |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
optional |
- |
string |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Required/Optional |
Values |
Type |
Description |
| additional_info.text |
optional |
- |
number |
The alarm text |
| additional_info.duration |
optional |
- |
number |
The alarm duration in seconds |
| additional_info.refNumber |
optional |
- |
string |
Alarm sequence number in hex |
| additional_info.reason |
optional |
- |
string |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
| additional_info.clear_x |
optional |
- |
number |
The x coordinate of the vehicle when alarm was cleared |
| additional_info.clear_y |
optional |
- |
number |
The y coordinate of the vehicle when alarm was cleared |
| additional_info.clear_z |
optional |
- |
number |
The z coordinate of the vehicle when alarm was cleared |
| additional_info.clear_sublocation_uid |
optional |
- |
string |
The area uid of the vehicle coordinate when alarm was cleared |
Response Fields
| Field |
Description |
| mac_address |
The MAC address of the node. |
| alarm_name |
The name of the alarm type:- zone_violation
- emergency_button
- uncertified_operation*
|
| additional_info |
A JSON object with additional information about the zone. |
| acknowledged |
Reserved field. |
| acknowledged_by |
Reserved field. |
| created_at |
The time when the alarm was created, in UTC. |
| updated_at |
The time when the alarm was last updated, in UTC. |
| hysteresis_count |
The number of alarm publications. |
| state |
The state of the alarm:- set - The alarm has been triggered and is currently alarming.
- clear - The alarm has been cleared and is no longer alarming.
|
| obj_uid |
The unique identifier of the trackable object. |
| alarms.uid |
The unique identifier of the alarm. |
| ts |
The timestamp part of position of the trackable when it triggered the alarm, in seconds. |
| ms |
The timestamp part of position of the trackable when it triggered the alarm, in milliseconds. |
| sublocation_uid |
The unique identifier of the area. |
| x |
The x-coordinate of the position of the trackable when it triggered the alarm. |
| y |
The y-coordinate of the position of the trackable when it triggered the alarm. |
| z |
The z-coordinate of the position of the trackable when it triggered the alarm. |
| Field |
Description |
| additional_info.zone_alarm_level |
The severity level of the zone violation alarm, if the alarm is a zone violation. The severity level range is from 1-4, where one is the least severe and 4 is most severe. |
| additional_info.text |
Text about the alarm. The field appears on the badge screen of the alarming tag when the alarm is generated. |
| additional_info.zone_violation_type |
The type of zone violation, if the alarm is a zone violation: |
| additional_info.zone_uid |
The unique identifier of the zone, if the alarm is a zone violation. |
additional_info (pws_safety)
| Field |
Description |
| additional_info.distance |
The minimal distance between the trackables triggered alarm. |
| additional_info.name |
Text name of the reported trackable. |
| additional_info.category |
Text trackable object category described in Trackables API. |
| additional_info.contact_name |
The name of the contacted trackable object. |
| additional_info.contact_category |
Text contacted trackable object category described in Trackables API. |
| additional_info.contact_uid |
The unique identifier of the contacted trackable object. |
| additional_info.contact_x |
The x-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_y |
The y-coordinate of the position of the contacted trackable when it triggered the alarm. |
| additional_info.contact_sl_uid |
The unique identifier of the area where located the contacted trackable when it triggered the alarm. |
additional_info (uncertified_operation)
| Field |
Description |
| text |
The alarm text |
| duration |
The alarm duration in seconds |
| refNumber |
Alarm sequence number in hex |
| reason |
The reason of alarm clearing: - uncertified_operation_stop
- reboot
- not_responsive
- close_association
|
| clear_x |
The x coordinate of the vehicle when alarm was cleared. The field is present in response only for cleared alarms |
| clear_y |
The y coordinate of the vehicle when alarm was cleared. The field is present in response only for cleared alarms |
| clear_z |
The z coordinate of the vehicle when alarm was cleared. The field is present in response only for cleared alarms |
| clear_sublocation_uid |
The area uid of the vehicle coordinate when alarm was cleared. The field is present in response only for cleared alarms |
Example Request
{
"alarm_name": "zone_violation",
"additional_info": {
"zone_uid": "1111111111111111111111",
"zone_alarm_level": 3
},
"state": "set",
"obj_uid": "DekTq5B-R1O37-WvwgYcOQ",
"obj_class":"TO",
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"ts": 1532691121,
"ms": 327,
"x": 1000,
"y": 15620,
"z": 1088
}
Example Response
{
"alarm": {
"mac_address": "123123",
"alarm_name": "zone_violation",
"additional_info": {
"zone_uid": "1111111111111111111111",
"zone_alarm_level": 3
},
"acknowledged": 0,
"acknowledged_by": null,
"created_at": "2017-06-27T12:01:44.000Z",
"updated_at": "2017-06-27T13:05:44.000Z",
"alarm_type_id": 2,
"hysteresis_count": 5,
"state": "set",
"obj_uid": "DekTq5B-R1O37-WvwgYcOQ",
"uid": "bmahpWu0S6KwBoBaHooKIw",
"project_uid": "_2E2DIF5SAemIHbnIhLbGg",
"sublocation_uid": "2Mb9auXPSO_2C739PId0zQ",
"ts": 1532691121,
"ms": 327,
"x": 1000,
"y": 15620,
"z": 1088
}
}
Delete alarm
DELETE api/alarms/{uid}
Delete an alarm with a specified alarm UID. To retrieve an alarm UID, see get alarms.
Successful request returns status 200.
Note: DELETE api/alarms deletes an alarm's presence and history in the database. If an alarm is current and has not yet been cleared, deleting the alarm does not clear the alarm. A deleted alarm continues to be displayed on the badge and in the SiteWise and SitePlan softwares. If a current alarm is deleted and gets stuck, change the device's parameters in SitePlan to clear the alarm.
To clear an alarm, change its status field to "clear" using update alarm.