Miscellaneous Examples
Here is a list of commands that you might use to build an application. This should give you a good idea of how the interface has been designed.
Here is a list of commands that you might use to build an application. This should give you a good idea of how the interface has been designed.
Hi,
I have a couple of questions/comments.
1. I am trying to organize stop predictions for specific route+direction combinations. http://api.metro.net/agencies/lametro/stops/16304/predictions/ is returning an item with e.g. {“run_id”: “4_157_1″, “route_id”: “4″}. However, when I subsequently call http://api.metro.net/agencies/lametro/routes/4/runs/ to learn more about run 4_157_1, I only receive {“items”: [{"route_id": "4_159_1", "display_name": "West to Santa Monica", "id": "4_159_1", "display_in_ui": true, "direction_name": "West"}, {"route_id": "4_165_0", "display_name": "East to Downtown LA - Broadway-Venice", "id": "4_165_0", "display_in_ui": true, "direction_name": "East"}]}. Why doesn’t run 4_157_1 appear in this list?
2. http://api.metro.net/agencies/lametro/routes/4/runs/ returns as an item, e.g. {“route_id”: “4_159_1″, “id”: “4_159_1″, ..}. Shouldn’t “route_id” be “4″, not “4_159_1″?
3. Are run_id’s meant to map to trips in the GTFS data feed? They don’t seem to have matching IDs.
4. The XML version appears to be returning 500 Server Errors. E.g. http://api.metro.net/agencies/lametro/routes/704/runs/xml/ . This has been occurring for at least two weeks now.
Thanks for your assistance!
Hi Jasonshah,
These are good questions. I can confirm the problem you are seeing on questions 1 & 2. I’ll need to check with the Nextrip developers to give you a good answer.
3. You should be able to find those run_ids in the GTFS. Are you looking at the most recent data?
4. There is little demand for the XML feed and it has languished since I upgraded the server. Do you require it for your application?
I will also look into giving more meaningful errors too. 50x errors aren’t very helpful!
Thanks,
-Doug
Hi. Is the realtime api down? I’m getting 502 response on all requests for past few days.
Thanks,
Ian