Location Trackers
Reporting Endpoint Status
The HTTP integration of location trackers uses the following structure:
POST /services/gear/DeviceIntegrationService.svc/UpdateLocationTrackerStatus HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"latitude": -13.9957594,
"longitude": 48.9339384,
"flags": 0,
"timestamp": "2021-02-23T14:55:03"
}Parameters
| Name | Description | Data Type |
|---|---|---|
| accessToken | Access token with permissions to update endpoint information. See this page for more information. | text |
| endpointID | Unique endpoint identifier or combination of device address and endpoint address in format [deviceAddress]:endpointAddress (e.g.: [device-1234]:1). These values can be found on the endpoint management page. | numeric |
| latitude | The latitude, between -90 and 90. Use a period as the decimal separator. | numeric |
| longitude | The longitude, between -180 and 180. Use a period as the decimal separator. | numeric |
| flags | Extra information about the position, as an integer that is a bitwise sum. Available flags: 0 = nothing special; 1 = the sensor's position is changing; 2 = the sensor cannot acquire its position; 4 = the sensor is not working properly and the reported position may be wrong; 8 = the reported position has low accuracy. Flags can be combined with OR. For example, a low-accuracy position that is also changing is (8 OR 1) = 9. | numeric |
| timestamp | Optional value indicating the UTC date and time corresponding to the measurement. The date format must match one of those specified in the date formats section. If the field is omitted, the platform will assume the measurement corresponds to the current date and time. | text |
Reporting Status in "raw" Format
The endpoint state can be reported as a raw value using the expression converter. This option is convenient when the device is unable to perform conversions and emits values that need to be transformed before being injected into the platform.
Below is an example of a raw format request:
POST /services/gear/DeviceIntegrationService.svc/UpdateLocationTrackerStatusRaw HTTP/1.1
Host: gear.cloud.studio
Content-Type: application/json
{
"accessToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"endpointID": 1,
"rawData": "-13.9957594,48.933938,0",
"timestamp": "2021-02-23T14:55:03"
}Parameters
| Name | Description | Data Type |
|---|---|---|
| accessToken | Access token with permissions to update endpoint information. See this page for more information. | text |
| endpointID | Unique endpoint identifier, which can be found on the endpoint management page. | numeric |
| rawData | Value reported by the sensor, as text. Three expressions must be specified in the expression converter. The first must return a numeric value with the latitude, between -90 and 90. The second must return a numeric value with the longitude, between -180 and 180. Use a period as the decimal separator in both. The third must return an integer with the position flags, a bitwise sum: 0 = nothing special; 1 = the sensor's position is changing; 2 = the sensor cannot acquire its position; 4 = the sensor is not working properly and the reported position may be wrong; 8 = the reported position has low accuracy. Flags can be combined with OR, for example (8 OR 1) = 9. | text |
| timestamp | Optional value indicating the UTC date and time corresponding to the measurement. The date format must match one of those specified in the date formats section. If the field is omitted, the platform will assume the measurement corresponds to the current date and time. | text |
Last updated on