Location Intelligence APIs - Overview
Location Intelligence (LI) APIs are RESTful HTTP APIs. The APIs provide access to tags such as Asset and Badge tags. Tags correspond to track objects in the Location Intelligence BlueGPS application.
The following endpoints are defined to allow API users to retrieve information for tags and manage tags.
1. GET Ping
2. Fetch a Tag
The BlueGPS application uses data from Enlighted Manage to track tags as they move around on a floor. The Enlighted physical Asset Tags have an Attention button on the front and a Tamper button on the back. The application’s event monitoring feature detects conditions configured in the application and triggers events. The tags send Tag event messages when the Attention button is activated on the physical tag for events such as a low battery or when the Tamper button is activated.
Due to the volume of data transfer from the tags to the application via Manage, users can reduce data congestion in the network for receiving API responses. Users must configure the Bluetooth Tag settings in Manage by choosing sensor data reporting intervals and selecting which sensors must report data to reduce network congestion. Refer to Bluetooth Tag Settings.
Authentication
The Location Intelligence APIs use Machine-to-Machine Authentication and Authorization with OAuth2.0 client credentials flow.
-
End-user requests Enlighted for API access.
-
Once approved, Enlighted will email the end-user with a Client ID and Client Secret.
-
Request Auth0 service for a Bearer token using a Client ID and Secret provided by Enlighted.
Example request for Bearer Token
1 curl --request POST \
2 --url https://enlightedinc-p01.us.auth0.com/oauth/token \
3 --header 'content-type: application/json' \
4 --data '{"client_id":<client_id>,"client_secret":<client_secret>,"audience":"https://rtls-us-east-1-prod.dsp.enlightedinc.com/","grant_type":"client_credentials"}'
Response
1 {
2 "access_token": <access_token>,
3 "token_type": "Bearer"
4 }
Include Bearer token in the request header of the API request.
1 curl --header 'Authorization: <access_token>' --header 'x-dsp-selected-tenant-role: NA' ...
Get PING
Tests the connectivity to the API to see if the service is alive.
Request
GET /api/v1/ping
Parameters
None
Response
None
Fetch a Tag
Retrieves a Tag’s properties based on its Tag ID.
Request
GET /api/v1/enterprises/<enterprise_id>/tags/<tag_id>
Parameters
BatteryVoltage |
string |
Tag voltage |
BatteryVoltageTimestamp |
string |
Timestamp of the latest battery voltage update |
ButtonStatus |
string |
Tamper: When an Asset Tag is removed from an asset, the Tag’s Tamper button gets activated. True - Attention Button on the Asset Tag is activated |
ButtonTimeStamp |
string |
Timestamp of the most recent button message received from the tag |
ComputationTimestamp |
string |
Timestamp at which this position was computed |
DisplayCoordinates |
string |
Coordinates of the marker to be displayed for the tag. The coordinates of the tag’s path are translated left and up by the anchor’s x and y points. Note that this does not indicate the actual position of the tag. |
enterprise_id |
string |
The ID of the organization |
Floor |
string |
The floor level on which the tag is available |
Motion |
string |
False - The tag is not moving |
RawDataTimeStamp |
string |
Timestamp of the most recent raw data included in the computation of this tag position |
Request |
|
|
Response |
|
|
tag_id |
string |
The ID or MAC address of the tag that is being queried. Scan the QR code on the tag to get the Tag_ID and the MAC address. |
TagID |
string |
The ID of the tag that is queried |
TagMac |
string |
MAC address of the tag |
Zone |
string |
Zone assigned to the tag |
Response
A sample code below listing the tag details.
1 {
2 "tagId": "da375073-7e33-480d-8209-3467c6ccbc1b",
3 "tagMac": "6864F5AD2C04",
4 "zone": "Scrum_Area",
5 "floor": "AAVmbG9vcgACdXMA7sxRX-kR6qQSr2ZiKK_pyL7WMV_pEeq0LVf43pYdWg",
6 "motion": false,
7 "displayCoordinates": {
8 "x": 0.0,
9 "y": 0.0
10 },
11 "rawDataTimestamp": "2022-11-15T07:38:25+00:00",
12 "computationTimestamp": "2022-11-15T07:38:29.889260+00:00",
13 "batteryVoltage": 2.823,
14 "batteryVoltageTimestamp": "2022-11-15T07:42:15+00:00",
15 "buttonStatus": {
16 "tamper": true,
17 "attention": false
18 },
19 "buttonTimestamp": "2022-11-15T07:38:54+00:00"
20 }
Iterate Over All Tags
Use this API call to iterate or run a block of code repeatedly for all tags in an organization.
Request
GET /api/v1/enterprises/<enterprise_id>/tags
Parameters
Request |
|
|
enterprise_id |
string |
The ID of the organization |
count |
integer |
The number of tags ranging between 5 and 100. This indicates the number of tags to be returned in one page. By default 50 tags information is returned in one page. |
cursor |
string |
Fetches the next page of data |
Response
1 {
2 "data": <list[Tag]>,
3 "meta": {
4 "nextCursor": "eyJvZmZzZXQiOiAxMn0="
5 }
6 }