GuidesAPI Reference
Guides

How to migrate incident data requests

How to migrate incidents data requests

This section describes how to migrate incidents data requests from the Traffic API v6 to v7.

Request

For more information on Traffic API v7 request parameters, see the Flow - Request Parameters section of the Traffic API v7 Developer's Guide.

Parameters added

The following parameter has been added:

  • in

Parameters Changed

The following parameters have changed:

  • endTime
  • i18n
  • lg
  • startTime

Parameters removed

The following geospatial parameters have been replaced by the in parameter:

  • bbox
  • corridor
  • prox
  • quadkey (unsupported in Traffic API v7, use bounding box instead)

The following parameters have been removed:

  • c
  • inc22
  • jsoncallback
  • localtime
  • maxresults
  • profile
  • sort
  • status
  • tables
  • verified

For more information, see the table in Parameter mapping.

Base URL, version, and resource

ParameterTraffic API v6Traffic API v7Migration Notes
Base URLhttps://traffic.api.here.comhttps://data.traffic.hereapi.com
Version/traffic/6.3v7
Resource/incidents.{format}incidentsThe Traffic API v7 only supports JSON.
Resource/incidents/{format}incidentsThe Traffic API v7 only supports JSON.
Resource/incidents/{zoom}/{x}/{y}/{format}incidentsMust be translated to bounding box.

The possible formats for incident data in the v6 API are json and xml, the Traffic API v7 response data is always in JSON format.

To transform a tile address of the form {zoom}/{x}/{y} to a bounding box, see the instructions in Migrate Geospatial Filter Parameters.

Parameter Mapping

Traffic API v6Traffic API v7Migration Notes
bboxin=bbox:See Migrate geospatial filter parameters for details.
corridorin=corridor:See Migrate geospatial filter parameters for details.
proxin=circle:See Migrate geospatial filter parameters for details.
quadkeyin=bbox:Quadkeys are unsupported in Traffic API v7, see Migrate geospatial filter parameters for information on how to convert to a bounding box.
cThe Traffic API v7 data model uses standard formats for all units.
criticalitycriticality
endTimelatestEndTime
i18nlangi18n and lg are replaced by a single lang parameter.
inc22The Traffic API v7 doesn't support the v6 API TML data format.
jsoncallbackFunction wrapped JSON responses are not supported in the Traffic API v7, as CORS is supported.
lglangi18n and lg are replaced by a single lang parameter.
localtimeThe Traffic API v7 always returns UTC times.
maxresultsResult count limits are not currently supported.
profileProfiles are not supported in Traffic API v7. All regions are available in all requests.
sortSorting is not supported in the Traffic API v7.
startTimeearliestStartTime
statusStatus has been removed from the v7 data model as only active was previously used.
tablesFiltering by TMC table is currently not supported in the Traffic API v7.
typetype
verifiedVerified has been removed from the v7 data model as only true was previously used.
unitsunitsThe Traffic API v7 represents length in meters and speed in meters per second.

Data model

The data model is significantly different between the v6 and v7 Traffic APIs. The full v7 data model can be found in the API Reference.

The concepts are described in the Incident Concepts section of the Developer's Guide.