Traffic TPEG API Developer's Guide

Initsession Example

To start an authenticated session send the following xml body as an HTTP post request containing an HTTP Content-Type header of application/xml:

<?xml version="1.0" encoding="UTF-8" ?>
  <tpeg format="TPEGBinary">
  <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"/>
  <att name="radius" value="25"/>
  <att name="expiration" value="180"/>
  <att name="timeout" value="30"/>
  <att name="frequency" value="180"/>

to the initsession resource:{YOUR_APP_ID}&app_code={YOUR_APP_CODE}
Explanation of the parameters:
  • tpeg format: request traffic info in the TPEGBinary format.
  • loc-ref: any supported Location Referenicng. See Supported location referencing.
  • app: request Traffic Event Compact (TEC) version 3.0 and Traffic Flow and Prediction (TFP) 1.0 applications.
  • configuration radius: return information for an area with a radius of 25 km.
  • configuration expiration: After 180 minutes a new initsession is required.
  • configuration timeout: Optional integer in minutes. This is a notifier in the service to support DeltaUpdate functioanality. A value of '0' is to receive the full updates for every request. In other words, if there has been no getmessages request received in this time frame, the initial session initsession is still valid, serving the full updates. Default value for this timeout is 100 minutes.
  • configuration frequency: Optional integer in minutes. An indication of the update request frequency.
The XML response contains the URL and encryption key for traffic information requests such as Getmessages Proximity Example and Getmessages Corridor Examples.