Traffic TPEG API Developer's Guide

InitSession Request

Parameters for initsession request are passed in both POST request XML body and as part of URL, which must conform to the initsession request XSD. Common parameters are listed in the following table:

Table 1. Request Parameters
Parameter Description
app_id

A 20-byte Base64 URL-safe encoded string used for the authentication of the client application.

app_code

A 20-byte Base64 URL-safe encoded string used for the authentication of the client application.

profile

A string value parameter which defines profile of the client application.

Table 2. Request Parameters POST
Parameter Description
tpeg

Occurs only once as a child of init-session.

  • @format: TPEGBinary.
  • @messagesize: Integer.
  • @sessionsize: Integer.
loc-ref

Occurs at least once as a child of tpeg.

  • @id: Request Traffic Message Channel (TMC)
  • @version: The version of each standard. Currently 1.3
  • @id: Request Extended TMC Locations (ETL).
  • @version: The version of each standard. Currently 1.0
app

Occurs at least once as a child of tpeg.

  • @id: Request Traffic Event Compact (TEC) or Traffic Flow and Prediction (TFP) 1.0 applications.
  • @version: The version of each standard. Currently 3.0 and 1.0 respectively.
configuration Can occur once as a child of init-session.
att name="radius" Optional integer in km, must be smaller than 100 km. Default value is 10 km.
att name="timeout" Optional integer in minutes. This is a notifier in the service to support delta functioanality. A value of '0' is to receive the full updates i.e, with out Delta functionality. In other words, if there has been no getmessages request received in this time frame, the initial session initsession is still valid, serving the fullupdates. Default value 100 minutes.
att name="expiration" Optional integer in minutes. After this time a new initsession is required. Default value is 999 minutes.
att name="frequency" Optional integer in minutes. An indication of the update request frequency.

Example Request Body


<?xml version="1.0" encoding="UTF-8"?>
<init-session>
  <tpeg format="TPEGBinary" messagesize="50000" sessionsize="1000" >
    <loc-ref id="TMC" version="1.3" />
    <loc-ref id="ETL" version="1.0" />
    <app id="TEC" version="3.2" />
    <app id="TFP" version="1.0" expiration="17" />
  </tpeg>
  <countries current="DE" destination="FR" />
  <configuration>
    <att name="radius" value="10" />
    <att name="expiration" value="600" />
    <att name="timeout" value="300" />
    <att name="frequency" value="180" />
  </configuration>
</init-session> 

InitSession Response

All initsession responses are in XML format, conforming to the initsession response XSD.

Example Response


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<init-session-response 
url="https://tpeg.cit.cc.api.here.com/tpeg/1.0/getmessages?v=5&cfg=1DpmhH-p7ElBonkVviVIDrPP3S.lVqIMc33pfUJ2luIDN58GPGDXo2zkQiizAnE-J-2W-MZbShEADKC6GFvLOO7pTnK41VTt3lRfk5cr7CFsMkXz97WRVx57LnljI-9d" 
key="99a8cd635aa563acaf0c486992d297ad">
  <config name="fcd" value="enabled"/>
  <server-settings>
    <att name="max-vicinity-radius" value="100" />
    <att name="max-corridor-width" value="10" />
    <att name="max-corridor-lenght" value="1000" />
    <att name="update-frequency" value="60" />
  </server-settings>
</init-session-response>