Hi Max,
The vehicle monitoring API provides vehicle locations and has limited information about the lines. Detailed information about routes/lines operated by any transit agency can be found using the lines API (https://api.511.org/transit/lines?api_key=ENTER-API-KEY-HERE&operator_id=BA). In addition, to this endpoint 511 SF Bay Open Data Portal also offers other endpoints that provide information about transit services in SF Bay Area. The ‘Open 511 Data Exchange Specifications – Transit’ document available on https://511.org/open-data/transit can give you detailed information about the available API endpoints.
Feel free to reach us if you have any questions or concerns.
Regards,
Kapeel Daryani.
From: 511sfbaydevel...@googlegroups.com <511sfbaydevel...@googlegroups.com>
On Behalf Of Max Eagle
Sent: Saturday, February 4, 2023 5:22 PM
To: 511SFBayDeveloperResources <511sfbaydevel...@googlegroups.com>
Subject: [511SFBayDeveloperResources] Returning detailed information for real time vehicle monitoring
*External Email*
How can I return more detailed information for real time vehicle monitoring?
Here's my Python code:
response = requests.get(f'http://api.511.org/transit/VehicleMonitoring?api_key={api_key}&agency=BA')
json.loads(response.content.decode('utf-8-sig'))
I return this as a result:
But the API guide shows a sample result with much greater detail:
My guess is that I need to provide a line id and / or a vehicle id, but when I tried doing that, neither returned anything more specific than what I initially had.
Any advice or help is greatly appreciated.
Max
--
You received this message because you are subscribed to the Google Groups "511SFBayDeveloperResources" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
511sfbaydeveloperre...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/511sfbaydeveloperresources/1d71c21e-6070-4cab-87b2-d5943d51aa2an%40googlegroups.com.