GuidesAPI Reference
Guides

How to claim a virtual device

To enable a device to ingest and store data into the HERE Tracking API, the device first needs to be claimed by an end user. Unclaimed devices cannot communicate with the API. In the HERE Tracking API, an end user who claimed a device, is referred to as the device owner. The device owner controls the device and can access data ingested by it.

Claim a device to a project

To claim a virtual device to a user project, you should have a provisioned virtual device that has not been claimed yet. For more information, see Claim a device.

curl -X PUT \
  https://{tcHost}/registry/v2/devices/{externalId}?appId=`appId` \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'Content-Type: application/json'
{
  "trackingId": "VRTR-11111111-2222-3333-4444-555555555555555"
}  
📘

Note

The externalId specified in the request URL is an id of a previously provisioned virtual device, for example: my-first-device. One only needs externalId and appId, but not deviceId for claiming a virtual device.

This will return a newly created trackingId. This is a unique identifier associated with the device data in the Tracking backend.

Verify the device is in the user's list of devices

For more information, see Gets all devices claimed by a project. If the user is a member of multiple projects, the target project ID needs to be specified in the projectId query parameter.

curl -X GET \
  https://{tcHost}/users/v2/devices?projectId=`projectId` \
  -H 'Authorization: Bearer {accessToken}'

This will list all the devices claimed by a user project identified by the projectId.

Next steps

Now you can proceed with sending data to the HERE Tracking API.