sl-realtidsinformation-4
Hi,
I am trying to upgrade the API from 3 to 4 i.e. sl-realtidsinformation-4,
but didn't understand where to get the values of siteid and what is time window?
Could you please provide a demo request with parameters.Thanks
Regards
Harsh
I am trying to upgrade the API from 3 to 4 i.e. sl-realtidsinformation-4,
but didn't understand where to get the values of siteid and what is time window?
Could you please provide a demo request with parameters.Thanks
Regards
Harsh
Följ inlägget
0
följare
An example can be found in the console for SL Realtidsinformation 4
http://api.sl.se/api2/realtimedeparturesv4.json?key=<KEY>&siteid=9192&timewindow=5
In the above example the siteid 9192 is the stop Slussen and the timewindow parameter limits the results to departures within 5 minutes.
Siteid can be found using this API
An example of request: http://api.sl.se/api2/LineData.xml?model=site&key=
Kind regards
Kenneth
It means now in have to make an api call to get the SiteID?? Which is not required in the version 3 ??
Regards
HARSH
It depends on you application and needs. If your application is always checking the same site there is no need to use the hållplatser och linjer API 😀
Kinds regards
Kenneth
one last question, What's the use of site ID ??
Thanks
It is a way of limiting the search results to a specific station.
Best regards
Kenneth
I am getting invalid api key, statusCode: 1005
Link: http://api.sl.se/api2/realtimedeparturesv4.json?key=&siteid=9192&timewindow=5
I have tried Key values of SL Traffic mode 2, SL Disturbance Information 2, SL Location Lookup .
Please suggest.
Thanks
The above link you provided is missing a personal API key. You need to create a project and get valid keys for the API:s.
Please follow the guide:
https://www.trafiklab.se/hur-gor-jag
There is a drop down in the top right corner where you can change the language to english.
Best regards
Kenneth
there are 3 type of API keys available and in have tried each but itsnot working, Types of API are given below:
1: SL Disturbance Information 2
2: SL Traffic fashion 2
3: SL Location Lookup
Please find the attached screenshot.
Please suggest which api key i need to use.
Thanks
For the above API request you need a key for SL Real Time Information 4. Each key is unique and not interchangable between APIs. It seems like you need to apply for a new key for SL Real Time Information 4
Best regards
Kenneth