-
Notifications
You must be signed in to change notification settings - Fork 0
REST Apis
Prateek Srivastava edited this page Mar 30, 2018
·
10 revisions
digitreck provides several REST apis for locating device, managing tracking sessions and places.
Base Url
https://api.digitreck.com
This section consists of location management apis like device location, path and fetching nearby devices.
GET /v1/device/location/<DEVICE_ID> HTTP/1.1
Host: api.digitreck.com
Authorization: <YOUR_PROJECT_SECRET_KEY>
GET /v1/device/path/<DEVICE_ID>?from=<START_DATE_IN_MILLIS>&to=<END_DATE_IN_MILLIS> HTTP/1.1
Host: api.digitreck.com
Authorization: <YOUR_PROJECT_SECRET_KEY>
GET /v1/device/nearby?tag=<OPTIONAL_TAG>&lat=<LATITUDE>&lng=<LONGITUDE>&count=<OPTIONAL_RESULT_COUNT> HTTP/1.1
Host: api.digitreck.com
Authorization: <YOUR_PROJECT_SECRET_KEY>
This section consists of places management apis like adding and deactivating places.
POST /v1/place HTTP/1.1
Host: api.digitreck.com
Content-Type: application/json
Authorization: <YOUR_PROJECT_SECRET_KEY>
{
"tag":"<OPTIONAL_TAG>",
"label":"<UNIQUE_PLACE_LABEL>",
"lat":12.345,
"lng":98.765,
"range":100
}
DELETE /v1/place/<PLACE_ID> HTTP/1.1
Host: api.digitreck.com
Authorization: <YOUR_PROJECT_SECRET_KEY>