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

ei muokkausyhteenvetoa
Ei muokkausyhteenvetoa
Ei muokkausyhteenvetoa
Rivi 52: Rivi 52:
</pre>
</pre>
=== SIRI JSON documents over HTTP GET ===
=== SIRI JSON documents over HTTP GET ===
Rest access responds to HTTP GET requests and returns JSON formatted textual data. This allows the client avoid XML request parsing which is typically cumbersome for example to JavaScript clients.


To access the SIRI vehicle monitoring client must send HTTP GET requests to http://178.217.134.37:8080/siriaccess/vm/rest


Rest access responds to HTTP GET requests and returns JSON formatted textual data.
The URL supports following parameters
* lineRef=<string>
* vehicleRef=<string>
* indent=<yes|no>
 
==== Url examples ====
* http://178.217.134.37:8080/siriaccess/vm/rest returns data for all vehicles
* http://178.217.134.37:8080/siriaccess/vm/rest?lineRef=22 returns data for all vehicles currently operating on specified line
* http://178.217.134.37:8080/siriaccess/vm/rest?vehicleRef=paunu_155 returns data for specified vehicle
* http://178.217.134.37:8080/siriaccess/vm/rest?indent=yes returns data in human readable format, indent parameter works also in conjunction with lineRef and vehicleRef parameters
0

muokkausta