V3 API /shape and direction_id

58 views
Skip to first unread message

Austin P

unread,
Aug 3, 2020, 1:26:13 PM8/3/20
to MBTA Developers

Hi,

It looks like the documentation for the V3 API suggests that queries to the /shapes endpoint should return a direction_id value with each polyline entity. However, I'm not seeing it when I query /shapes or /shapes/{id}.

I can filter based on direction_id, but it still doesn't show up in the output, and the sorting option doesn't seem to work.
Any guidance would be appreciated!

Best,
Austin Paul

Developer at MBTA

unread,
Aug 3, 2020, 1:49:14 PM8/3/20
to MBTA Developers
Hi Austin,

Thank you for bringing this to our attention. These references to `direction_id` appear to be an unintentional leftover from when we removed this field from shape resources, in API version 2020-05-01 (see announcement). We will remove them from the documentation, and eventually from the API as well.

If your application relied on this field, you can use a previous version of the API as explained in our Versioning doc — the newest version that still includes it is 2019-07-01. However, in principle anything that could previously be done with the removed Shape fields can still be done using Route Patterns. If you're unsure how, let us know what your use case is and we can recommend an approach.
Reply all
Reply to author
Forward
0 new messages