Siirry sisältöön

Ero sivun ”ITSFactory siriaccess developerguide” versioiden välillä

ei muokkausyhteenvetoa
Ei muokkausyhteenvetoa
Rivi 1: Rivi 1:
<div style="border: solid 1px; padding: 5px">The url of JSON API has changed to better reflect the nature of the interface (JSON instead of REST). <br>
The new url is: http://data.itsfactory.fi/siriaccess/vm/json <br>
The old url http://data.itsfactory.fi/siriaccess/vm/rest will continue to work but new clients are encouraged to use the new url.
</div>
During its beta phase, the ITS Factory SIRI Access responds to requests in urls:
During its beta phase, the ITS Factory SIRI Access responds to requests in urls:
* http://data.itsfactory.fi/siriaccess/vm/siri (SIRI XML documents over HTTP POST)
* http://data.itsfactory.fi/siriaccess/vm/siri (SIRI XML documents over HTTP POST)
* http://data.itsfactory.fi/siriaccess/vm/rest (SIRI JSON documents over HTTP GET)
* http://data.itsfactory.fi/siriaccess/vm/json (SIRI JSON documents over HTTP GET)


Both URLs will support following SIRI modules:
Both URLs will support following SIRI modules:
Rivi 110: Rivi 115:


==== Requests ====
==== Requests ====
To access the SIRI vehicle monitoring client must send HTTP GET requests to http://data.itsfactory.fi/siriaccess/vm/rest
To access the SIRI vehicle monitoring client must send HTTP GET requests to http://data.itsfactory.fi/siriaccess/vm/json


The URL supports following parameters
The URL supports following parameters
Rivi 118: Rivi 123:


===== Url examples =====
===== Url examples =====
* http://data.itsfactory.fi/siriaccess/vm/rest returns data for all vehicles
* http://data.itsfactory.fi/siriaccess/vm/json returns data for all vehicles
* http://data.itsfactory.fi/siriaccess/vm/rest?lineRef=22 returns data for all vehicles currently operating on specified line
* http://data.itsfactory.fi/siriaccess/vm/json?lineRef=22 returns data for all vehicles currently operating on specified line
* http://data.itsfactory.fi/siriaccess/vm/rest?vehicleRef=paunu_155 returns data for specified vehicle
* http://data.itsfactory.fi/siriaccess/vm/json?vehicleRef=paunu_155 returns data for specified vehicle
* http://data.itsfactory.fi/siriaccess/vm/rest?indent=yes returns data in human readable format, indent parameter works also in conjunction with lineRef and vehicleRef parameters, for example http://data.itsfactory.fi/siriaccess/vm/rest?indent=yes&lineRef=22
* http://data.itsfactory.fi/siriaccess/vm/json?indent=yes returns data in human readable format, indent parameter works also in conjunction with lineRef and vehicleRef parameters, for example http://data.itsfactory.fi/siriaccess/vm/json?indent=yes&lineRef=22


==== Responses ====
==== Responses ====
0

muokkausta