apis icon indicating copy to clipboard operation
apis copied to clipboard

Bus System endpoint is down

Open tomkenmag opened this issue 7 years ago • 16 comments

The bus system endpoint has stopped working, the livemap url has been moved apparently. When I send a get request to the livemap url I get the 404 page.

Steps to reproduce

  • npm test or
  • Goto http://apis.is/bus/realtime which returns {"error":"Something is wrong with the data provided from the data source"} or
  • curl -i https://straeto.is/bitar/bus/livemap/json.jsp

tomkenmag avatar Apr 03 '17 15:04 tomkenmag

Yeah, they introduced a new endpoint a while back. That one probably needs to be implemented instead of the one you mentioned.

kristjanmik avatar Apr 03 '17 15:04 kristjanmik

For anyone interested in looking into this, here is the new endpoint:

https://app.straeto.is/pele/api/v1/positions/filter/1,2,3,4,5,6,11,12,13,14,15,16,17,18,21,22,23,24,26,27,28,29,31,33,34,35,43,44

I do not know if the data is in the same format as before.

MiniGod avatar Apr 03 '17 15:04 MiniGod

I kind of need this api so I'll look into it.

tomkenmag avatar Apr 03 '17 15:04 tomkenmag

I reimplemented this in fec9a27f796f7bcd12e75c5f6da1da79471bd8b8 but added all the bus routes in the country. I was wondering if there should be a neat way to get all the bus routes in only Reykjavik, such as adding /rvk or /ak for Akureyri.

Also, the new endpoint returns a different response so this might have been implemented a bit differently, maybe someone has an opininion on that?

tomkenmag avatar Apr 06 '17 16:04 tomkenmag

Also, if anyone has any information about other open Strætó APIs, such as bus stops and so on, please let me know.

tomkenmag avatar Apr 06 '17 16:04 tomkenmag

This should still be valid: http://old.straeto.is/um-straeto/utgefid-efni/rauntimaupplysingar/

kristjanmik avatar Apr 06 '17 16:04 kristjanmik

I'll dump a few:

  • https://otp.straeto.is/otp/routers/default/index/stops
  • https://admin.straeto.is/api/places
  • https://admin.straeto.is/api/timetables/timatoflur
  • https://admin.straeto.is/api/timetables/0/1/1
  • https://admin.straeto.is/api/timetables/0/2/1
  • https://app.straeto.is/pele/api/v1/positions/filter/1,2,3,4,5,6,11,12,13,14,15,16,17,18,21,22,23,24,26,27,28,31,33,34,35,43,44
  • https://admin.straeto.is/api/alerts
  • https://otp.straeto.is/otp/routers/default/plan?fromPlace=64.1445471646293%2C-21.80623378245718&toPlace=64.09814246436902%2C-21.88766086745632&time=18%3A26&date=2017-02-28&mode=TRANSIT%2CWALK&maxWalkDistance=10000&arriveBy=false&wheelchair=false&showIntermediateStops=false&numItineraries=3&locale=is

The timatoflur endpoint seems to be what you were looking for.

MiniGod avatar Apr 06 '17 16:04 MiniGod

One question, I just get 400 with the message Missing Headers: web-language, what the hell is web-language and what should I provide to get something meaningful back?

tomkenmag avatar Apr 06 '17 17:04 tomkenmag

I don't know what that is. I just tried setting that header to en, and it replied...

curl -H "web-language: en" https://admin.straeto.is/api/timetables/timatoflur

MiniGod avatar Apr 06 '17 17:04 MiniGod

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Oct 12 '17 09:10 stale[bot]

We should probably fix this.

koddsson avatar Oct 15 '17 11:10 koddsson

The tests run fine for me now so we might be missing coverage here.

koddsson avatar Oct 15 '17 11:10 koddsson

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Dec 14 '17 12:12 stale[bot]

We're still working on getting the stale bot right. I've made changes so it won't mark bugs as stale.

koddsson avatar Dec 14 '17 21:12 koddsson

To make things easier:

The server behind behind https://otp.straeto.is/otp/routers/default/plan?fromPlace=64.1445471646293%2C-21.80623378245718&toPlace=64.09814246436902%2C-21.88766086745632&time=18%3A26&date=2017-02-28&mode=TRANSIT%2CWALK&maxWalkDistance=10000&arriveBy=false&wheelchair=false&showIntermediateStops=false&numItineraries=3&locale=is is an Open Trip Planner: https://www.opentripplanner.org

I implemented my app that consumes this endpoint using the documentation from Barcelona TMB: https://developer.tmb.cat The comments are mostly in Catalan, but the variable names and example data is english. i don't speak Catalan and this was suficient for me.

GerdC avatar Jul 19 '19 07:07 GerdC

Hallo! Any luck on this issue 😸

lindsaygelle avatar Oct 25 '19 12:10 lindsaygelle