Linz AG XML API - foop/opendata-linz-bimfahrer GitHub Wiki
- query url: http://www.linzag.at/static/
Miscellaneous
First step is to make this slide more accessible.
Introduction
All queries derive from the object itdRequest. itdRequest provides basic functionality such as
- session handling
- language settings
- execution mode (execInst)
- layout parameters
- transformation
Session Handling
There are two modes of queries sateful and stateless.
stateful
Creates a query session. A session comprises one ore more requests.
-
Name: sessionID
-
Value: numeric
-
Usage: set it to 0 on your first query or leave it blank. You'll get a sessionID returned that you can subsequently use.
-
Example: http://www.linzag.at/static/XML_TRIP_REQUEST2?sessionID=0
-
Name: requestID
-
Value: numeric
-
Usage: use zero for the first query. Increment it by 1, start your next query.
-
Purpose: identifies your request within in your session.
-
Example:
http://www.linzag.at/static/XML_DM_REQUEST?sessionID=14948624&requestID=1&dmLineSelectionAll=1&command=dmLast
language
use ISO 631:1988 language codes
- Name: language
- Values: language codes (see above)
- Example:
http://www.linzag.at/static/XSLT_TRIP_REQUEST2?language=en
execution mode
- Name: execInst
- Values: normal (implicit), verifyOnly, readOnly
-
verifyOnly : verifies, passed parameters will be included in the XML-Output, does not perform any calculations
-
readOnly : same as verifyOnly without verfication
-
- Example: `http://www.linzag.at/static/XML_TRIP_REQUEST2?type_origin=stopID&name_origin=60501200&type_destination=stopID&name_destination=60501070&execInst=verifyOnly
layout parameters
I have no idea what they do. Slides state that they are passed on without actually having any impact on the "system". The are used for remembering a certain condition of the user interface.
- Name: _itdLPxx__paramName; itdLPxx marks the parameter and will get stripped.
- Value: has to correspond to whatever one has choosen vor paramName
- Example: http://www.linzag.at/static/XML_TRIP_REQUEST2*itdLPxx_paramName=paramValue This was a silly example.
Parameters
General
- Name: outputFormat
- Values: HTML, XML, JSON
- Example:
&outputFormat=JSON
Date and Time
The system time will be used if no time was passed
- XML-Schema: itdDateTime
- Name: itdDate
- Values: YYYYMMTT or YYMMTT
- Example: http://www.linzag.at/static/XML_TRIP_REQUEST*itdDate=20110225
- ErrorCodes:
- -1: invalid date
- -10: year outside of allowed range
- -20: month outside of allowed range
- -30: day outside of allowed range
- -4001: date outside of bus (or whatever mean of transport ) timetable
- Examples: http://www.linzag.at/static/XML_TRIP_REQUEST2?itdDate=20110299 http://www.linzag.at/static/XML_TRIP_REQUEST2?itdDate=20110229
- Name: itdTime
- Value: HHMM
- Name: timeOffset
- Value: MM
- Name: _itdTimeAMPM
- Value: am|pm
- Example: http://www.linzag.at/static/XML_TRIP_REQUEST2?itdTime=1654
- ErrorCodes:
-
-1: invalid time
-
-10: hour outside of allowed range
-
-20: minute outside of allowd range
-
Example: http://www.linzag.at/static/XML_TRIP_REQUEST2?itdTime=1699
`
-
Stop-Finder-Request
Look for stops