openmobilityfoundation / mobility-data-specification

A data standard to enable right-of-way regulation and two-way communication between mobility companies and local governments.
https://www.openmobilityfoundation.org/about-mds/
Other
676 stars 232 forks source link

What vehicles are included in the MDS 2.0 /vehicles endpoint? #879

Closed jiffyclub closed 6 months ago

jiffyclub commented 9 months ago

In MDS 2.0 the /vehicles endpoint contains static vehicle information that could be required for vehicles deployed years in the past. However, the documentation reads:

The /vehicles is a near-realtime endpoint and returns the current status of vehicles in an agency's Jurisdiction and/or area of agency responsibility. All vehicles that are currently in any vehicle_state should be returned in this payload. Since all states are returned, care should be taken to filter out states not in the PROW if doing vehicle counts. For the states elsewhere and removed which include vehicles not in the PROW but provide some operational clarity for agencies, these must only persist in the feed for 90 minutes before being removed.

This is carryover language from MDS 1.x and I'm curious what the expectations are for the MDS 2.0 /vehicles endpoint (distinct from the /vehicles/status endpoint). Should it contain every vehicle ever deployed in a jurisdiction? If it is only expected to contain currently deployed vehicles (like the MDS 1.x /vehicles endpoint), what's the procedure for getting vehicle information for historically deployed vehicles? Request it one vehicle at a time via /vehicles/{device-id}?

And then thinking about the relationship between MDS 2.0 /vehicles and /vehicles/status, my instinct is that we should require that at a minimum the /vehicles endpoint should always return the same vehicles as would be returned by /vehicles/status and document that requirement. But that still leaves the question of how to get vehicle information for historically deployed vehicles.

schnuerle commented 8 months ago

If you can make a PR for this change, that would be helpful, and you'd be listed as a GitHub contributor. We are looking at creating a 2.0.1 release soon for all open issues and PRs tagged with the 2.0.1 Milestone. If not I will create the PR.

jiffyclub commented 8 months ago

I can make a PR but I think there's an unresolved question here of what the /vehicles endpoint should return.

jiffyclub commented 8 months ago

See #882 for PR. I'm proposing this language for the /vehicles endpoint expectations:

When /vehicles is called without specifying a device ID it should return every vehicle that has ever been deployed in an agency's Jurisdiction and/or area of agency responsibility.

schnuerle commented 6 months ago

Resolved with #882