Skip to main content

API

This tutorial is intended for software integrators who perform backend business functions based on the API interface of IPS Tools software. Through the API interface, you can obtain the UID, coordinates, power, working status of the Anchor, and Tag devices, as well as the real-time positioning of the Tag. The data format is JSON, and the interface protocols include MQTT, UDP, webhook, HTTP, etc. The software supports deployment on Ubuntu , Windows, MacOs and other platforms.

1.Data Format: JSON

Location data example:

{
"data": {
"mapId": 2, // The floor where the location is located.
"pos": [
-3.2616942,
4.3123593,
1.1999172
], //Position:x,y,z
"noiseRadius": 0.085815825, //Positioning noise, the larger the value, the lower the confidence.
"posVar": [
0.71,
0.62,
0.03
], //Positioning noise:x,y,z
"time": 1731034496, //Positioning unix timestamp.
"vel": [
-0.08,
0.1,
0
], //Velocity:x,y,z
"velVar": [
0.13,
0.13,
0.01
], //Velocity noise:x,y,z
"properties": {
"tansmit": "xxxxxxxxxxxx" // Transparent transmission data, encoded by base64.
},
"rxAnchorSn": "1e00400007503148", // The Anchor device UID corresponding to the strongest signal strength received.
"rxRssi": -47.235565185546875 // The strongest signal strength received
},
"deviceName": "T4", //Device name, which is unique within the software.
"name": "Pos", // Message type
"uid": "ea221ffdb4fbea42", //Device UID

}

2. Tag positioning API configuration entrance

Open the IPS Tool software and follow the steps below to enter the configuration page.

API 配置入口示例

3. Push Tag positioning data through MQTT protocol

address: {ip or domain name}:{port}

clientId: Client identification, can be empty

topic: Topic name

MQTT 配置示例

4. Push Tag positioning data through UDP protocol

address: {ip or domain name}:{port}

UDP 配置示例

5. Push Tag positioning data through webhook protocol

url格式: http://{ip or domain name}:{port}/{custom uri}

http method: POST

web hook 配置示例

6. Get device status through HTTP protocol

URL: GET http://localhost:8080/openapi/v1/devices?deviceType=&online=&query=&page=&pageSize=

Query parameter:

Parameter nameParameter typeParameter description
deviceTypeintSearch based on device type. Empty means querying all types of devices, 4 means querying Anchor devices, 5 means querying Tag devices.
onlineboolDepending on whether to search online, empty means querying all statuses, false means querying offline devices, and true means querying online devices.
querystringSearch based on device name prefix or device UID prefix
pageintPagination page number, the default is 1, 1 means the first page, and so on.
pageSizeintThe size of each page for paging, the default is 20, the maximum is 100

Response data:

{
"code": 0, // 0 indicates success, non-0 indicates failure
"message": "",
"data": {
"records": [
{
"type": 4, // Device type, 4 represents Anchor device, 5 represents Tag device
"online": false, // Device online status
"onlineTime": 1727323909, // Online and offline time, online is true to indicate online time, online is false to indicate offline time
"uid": "1b00530007503148", // Device UID
"product": "A01", // Device product
"coordinate": { // Device coordinates, currently only Anchor devices have
"coords": [
13.302, // x-axis
12.9, // y-axis
2.9 // z-axis
]
},
"name": "A1" // Device name
},
{
"type": 5, // Device type, 4 represents Anchor device, 5 represents Tag device
"online": false, // Device online status
"onlineTime": 1730860539, // Online and offline time, online is true to indicate online time, online is false to indicate offline time
"uid": "72bc78a7911d836f", // Device UID
"power": 50, // Device battery percentage
"product": "T02", // Device product
"name": "T5" // Device name
}
],
"total": 1 // Total number for current search criteria
}
}