Fleet Connectivity Extension API Developer's Guide

Requesting Updates from the Assets

This section provides an example of a request for an updated ETA from the assets.

User Story

In continuation of the user story from Sending a Job to an Asset, the dispatcher software client, Dispatcher-1, requests an update from Asset-1. The response from Asset-1 contains the remaining time in seconds and the current position in geocoordinates at a street corner in the immediate neighborhood of the target position at the HERE Berlin Campus.

Request Summary List Updates

Content-Type: application/json
Resource: listupdates
Parameters: [app_id={YOUR_APP_ID}], specifies the authentication app_id
  [app_code={YOUR_APP_CODE}], specifies the authentication app_id
  [dispatcher_id=Dispatcher-1], filters the updates messages for those that are sent to this dispatcher id

List Updates Request

https://fce.cit.api.here.com/1/listupdates.json
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&dispatcher_id=Dispatcher-1

List Updates Response

The response to the request contains a list of events with the following information:
  • the version of the Fleet Connectivity Extension API
  • the event ID which identifies the asset's status message
  • the message ID which identifies the request from the dispatcher software client
  • the job ID which identifies the asset's current job
  • the asset ID which indentifies the asset
  • the dispatcher ID which identifies the dispatcher software client
  • the creation time in Unix time format
  • the status message type
  • the update message itself including
    • the remaining time it takes the asset to reach its destination in seconds
    • the current position in WGS 84 geocoordinates
The example response in JSON format is as follows:
{
  events: [
    {
      version: "1.0",
      event_id: "7a86611f-5707-69ba-61dd-980cb814ba6c",
      message_id: "d50c0671-e52b-3c3f-5c1e-d97714791dd2",
      job_id: "12345",
      asset_id: "Asset-1",
      dispatcher_id: "Dispatcher-1",
      creation_time_ms: 1446202799806,
      type: "ETA_UPDATE",
      eta_update: {
        remaining_time_seconds: 30,
        lat: 52.53058,
        lon: 13.3775
      }
    },
    ...
  ]
}