How to migrate flow data requests
This section describes how to migrate flow 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 Guide.
Parameters added
The following parameter has been added:
in
Parameters changed
The following parameters have changed:
locationreferencesminjamfactormaxjamfactormaxfunctionalclass
Parameters removed
The following geospatial parameters have been replaced by the in parameter:
bboxcorridorproxquadkey(unsupported in v7 API, use bounding box instead)
The following parameters have been removed:
profileresponseattributesjsoncallbackunitsts
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 | /flow.{format} | flow | The Traffic API v7 only supports JSON. |
| Resource | /flow/{format} | flow | The Traffic API v7 only supports JSON. |
| Resource | /flow/{zoom}/{x}/{y}/{format} | flow | Must be translated to bounding box . |
Note
The possible formats for flow data in Traffic API v6 API are
jsonandxml, however Traffic API v7 response data is always in the JSON format.
To transform a tile address in the format {zoom}/{x}/{y} to a bounding box, see 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. |
profile | Profiles are not supported in Traffic API v7. All regions are available in all requests. | |
responseattributes | Not supported in Traffic API v7. | |
locationreferences=tmc | locationReferencing=tmc | Traffic API v7 supports the values tmc, shape, olr and segmentRef. |
locationreferences=shp | locationReferencing=shape | Traffic API v7 returns shape information (polyline and length) for every link. |
minjamfactor | minJamFactor | Note the difference in capitalization. |
maxjamfactor | maxJamFactor | Note the difference in capitalization. |
jsoncallback | Function wrapped JSON responses are not supported in the Traffic API v7, as CORS is supported. | |
maxfunctionalclass | functionalClasses | The Traffic API v7 accepts a list of functional classes, such as 1,2,3. |
units | The Traffic API v7 represents length in meters and speed in meters per second. | |
ts | The Traffic API v7 always returns traversability status when available. |
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 Flow Concepts section of the Developer Guide.
Updated last month