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

Parameter Traffic API v6 Traffic API v7 Migration Notes
Base URL https://traffic.api.here.com https://data.traffic.hereapi.com
Version /traffic/6.3 v7
Resource /incidents.{format} incidents The Traffic API v7 only supports JSON.
Resource /incidents/{format} incidents The Traffic API v7 only supports JSON.
Resource /incidents/{zoom}/{x}/{y}/{format} incidents Must 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 v6 Traffic API v7 Migration Notes
bbox in=bbox: See Migrate geospatial filter parameters for details.
corridor in=corridor: See Migrate geospatial filter parameters for details.
prox in=circle: See Migrate geospatial filter parameters for details.
quadkey in=bbox: Quadkeys are unsupported in Traffic API v7, see Migrate geospatial filter parameters for information on how to convert to a bounding box.
c The Traffic API v7 data model uses standard formats for all units.
criticality criticality
endTime latestEndTime
i18n lang i18n and lg are replaced by a single lang parameter.
inc22 The Traffic API v7 doesn't support the v6 API TML data format.
jsoncallback Function wrapped JSON responses are not supported in the Traffic API v7, as CORS is supported.
lg lang i18n and lg are replaced by a single lang parameter.
localtime The Traffic API v7 always returns UTC times.
maxresults Result count limits are not currently supported.
profile Profiles are not supported in Traffic API v7. All regions are available in all requests.
sort Sorting is not supported in the Traffic API v7.
startTime earliestStartTime
status Status has been removed from the v7 data model as only active was previously used.
tables Filtering by TMC table is currently not supported in the Traffic API v7.
type type
verified Verified has been removed from the v7 data model as only true was previously used.
units units The 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.

results matching ""

    No results matching ""