Traffic Model ID

Service version: 4 & 5
Last edit: 2022.09.12

Purpose

The Traffic Model ID is a parameter shared among all endpoints of the Traffic Incident Service, determining the freshness of traffic incidents.

  • It is a reference value for the state of traffic at a particular time.
  • It is updated every minute, and is valid for two minutes before it times out.
  • It should be used to grant data synchronization between calls and different APIs.
  • At a given point in time, all the Traffic endpoints have the same set of valid Traffic Model IDs.

Why use Traffic Model ID?

The Traffic Incidents service provides data, which is frequently changing in time. The update may even occur between two following user calls. As a result, the newer data from the second call might not match the data from the first call.
It is best to show this in the tile example, where part of the incident cannot be rendered due to the data update.

Tile rendering example with Traffic Model ID usage

Tile rendering example without Traffic Model ID usage

How to get the current Traffic Model ID?

The Traffic Model ID can be obtained in the following ways:

  1. By requesting the Incident Viewport endpoint. The most recent Traffic Model ID is in the response.
  2. By requesting the Incident Details endpoint without using the Traffic Model ID parameter. The most recent Traffic Model ID is one of the response headers.
  3. By requesting the Vector Incident Tiles endpoint without using the Traffic Model ID parameter. The most recent Traffic Model ID is one of the response headers.
  4. By requesting the Raster Incident Tiles endpoint without using the Traffic Model ID parameter. The most recent Traffic Model ID is one of the response headers.

How to correctly use the Traffic Model ID?

If a user wants to combine data from separate calls (no matter if calls are to the same endpoint or not), the same Traffic Model ID should be used for all of them.