Using ThingPark Location API
ThingPark Location provides developers with a comprehensive set of web-services based on the ThingPark DX framework. The following API are to be considered when interfacing with ThingPark Location.
Push locations to external application server
This section outlines the basic steps to configure ThingPark Location to send locations to external application server.
- The first step is to authenticate with ThingPark Location using your credentials. If you are using community platform, see here. For other platforms, see here. Once on swagger, click "Authorize".
- The next step will be to enter your credentials.
The client_id is DX-API-PREFIX/YOUR_LOGIN
The client_secret is your password.
DX-API Prefix is based on the platform where you created your account. If your account is on ThingPark Community, then the DX-API prefix is community-api as shown in the example below. For other platforms, visit here.
Once authenticated, you can access the ThingPark Location API documentation and swagger UI to interact with APIs.
- Goto Connector module and configure the URL of the external application server.
ThingPark Location will post JSON object ResolvedPosition to the external application server for the future positions sent by the tracker.
{
"deviceEUI" : "20635f028100003e",
"time" : "2022-09-02T08:04:25.731Z",
"customerId" : "100009247",
"modelCfg" : "1:TPX_ba3df8fb-bc93-45ee-aa0d-b2f873b9bbc6",
"dxProfileId" : "community-api",
"coordinates" : [ 103.924992, 1.3143296, 0.0 ],
"age" : 0,
"validityState" : "NEW",
"horizontalAccuracy" : 129,
"incomingSubscriberId" : "100009247",
....
}
Use Case | Example JSON Object | Object type |
---|---|---|
Example JSON geofenceAlarm object sent when entering Geofence | here | For more information on setting up Geofence, see ThingPark Location Introduction (Section: Setting up Geofencing) |
Example JSON geofenceAlarm object sent when leaving Geofence | here | For more information on setting up Geofence, see ThingPark Location Introduction (Section: Setting up Geofencing) |
Example JSON ResolvedTracker object sent when the tracker sends its configuration parameters | here | The tracker sends its configuration when either there is change of its configuration parameter by sending LoRaWAN downlink or when the parameter values are requested by sending device configuration downlink |
Example geofencingNotification JSON object sent when entering/exiting the different BLE geozones. | BLE Geozoning entry BLE Geozoning exit BLE Geozoning hazard BLE Geozoning safe | This JSON object is related to BLE Geozoning feature. For more details about BLE Geozoning feature, see BLE Geozoning and AN-011_BLE_geozoning |
Example TrackerAsAssetTracker JSON object which contains eventType object for the tracker events | Geolocation Start Event | This JSON object is sent when the tracker reports events. The geoloc_start event is configured in the tracker firmware by setting bit 6=0 in config_flags. |
Example TrackerAsAssetTracker JSON object which contains eventType object for the tracker events | Motion Start Event Motion End Event | This JSON object is sent when the tracker reports events. The motion_start and motion_end events are configured in the tracker firmware by setting bit 8=1 & bit 9=1 in config_flags. |
Example TrackerAsAssetTracker JSON object which contains eventType object for the tracker events | SoS Start Event SoS End Event | This JSON object is sent when the tracker reports events. The sos_start and sos_end events are sent when the tracker enters SoS mode. |
Example TrackerAsAssetTracker JSON object which contains messageType object for the tracker heartbeat message | Heartbeat | This JSON object is sent when the tracker reports heartbeat message. |
Example TrackerAsAssetTracker JSON object which contains messageType object for the tracker position message | BLE position GPS position GPS timeout LPGPS position LPGPS no position WiFi position | This JSON object is sent when the tracker reports position messages or Extended position messages. The filtered positions from the backend are in ResolvedPosition object |
Example TrackerAsAssetTracker JSON object which contains messageType object for the tracker Scan Collection messages | BLE Scan collection Eddystone BLE Scan collection MAC Address Wifi Scan collection | This JSON object is sent when the tracker reports Scan Collection messages. For more details about Scan Collection feature, see Scan Collection and AN-003_ScanCollection |
Example TrackerAsAssetTracker JSON object which contains messageType object for the tracker shock detection message | Shock detection | This JSON object is sent when the tracker reports shock detection message. |
Example TrackerAsAssetTracker JSON object which contains messageType object for the tracker shock detection message | Shutdown | This JSON object is sent when the tracker reports shutdown message. |
DX Admin API
DX Admin API provides a standard-based token management and administration features for the ThingPark DX API platform.
Useful links
DX Admin API | Resource |
---|---|
DX Admin Swagger UI | https://community.thingpark.io/thingpark/dx/admin/latest/swagger-ui.html |
DX Admin latest documentation | https://community.thingpark.io/thingpark/dx/admin/latest/doc/ |
ThingPark Location API
The purpose of this API is to provide the best experience for all developers who intend to interface their application with ThingPark Location features.
Useful links
URLs of ThingPark Location API can be found here.
You can find more information on using ThingPark Location API, ThingPark Location Training.