See data in the cloud

Your device is now reporting its data to the Tracking API. The next step is accessing that reported data.

Retrieve device data from the Tracking API

Prerequisites

  • The trackingId of a device that has been claimed to a project and has sent data to the Tracking API

Log the user in

curl -X POST \
  https://tracking.api.here.com/users/v2/login \
  -H 'Content-Type: application/json' \
  -d '{
    "email": "{userEmail}",
    "password": "{userPassword}"
}'

This will return an accessToken.

Retrieve the device shadow

Send a GET request to the shadows endpoint:

curl -X GET \
  'https://tracking.api.here.com/shadows/v2/{trackingId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'content-type: application/json'

This will return the device's most recent reported and desired shadows.

Retrieve the device trace

Send a GET request to the traces endpoint. A number of traces to be retrieved can be specified in the optional query parameter count.

curl -X GET \
  'https://tracking.api.here.com/traces/v2/{trackingId}?count=5' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'content-type: application/json'

This will return the device's trace.

results matching ""

    No results matching ""