Send an 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:
Parameter | Description |
---|---|
profile | A string value parameter which defines the profile of the client application. |
Authorization | Using app_id and app_code : Using apiKey : For instructions on how to use token authorization, see https://developer.here.com/documentation/authentication/dev_guide/topics/token.html. Note: The base URL for token authorization is https://tpeg.traffic.ls.hereapi.com. |
Parameter | Description |
---|---|
tpeg | Occurs only once as a child of
|
loc-ref | Occurs at least once as a child of
|
app | Occurs at least once as a child of
|
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" />
<loc-ref id="OLR" 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.traffic.hereapi.com/tpeg/1.0/initsession"
key="99a8cd635aa563acaf0c486992d297ad">
<config name="fcd" value="enabled"/>
</init-session-response>