Skip to content

Add event_time query parameter to events endpoint#140

Merged
schnuerle merged 1 commit intoopenmobilityfoundation:devfrom
populus-ai:event-time-query
Jul 15, 2025
Merged

Add event_time query parameter to events endpoint#140
schnuerle merged 1 commit intoopenmobilityfoundation:devfrom
populus-ai:event-time-query

Conversation

@jiffyclub
Copy link
Contributor

Explain pull request

The events/events endpoint currently has no documented way to indicate the time range for which data is being requested. Without a clear, documented way of requesting historical data implementers of CDS are likely to come up with myriad solutions of their own.

This adds an event_time query parameter to the API endpoint that takes the form of an ISO 8601 UTC hour YYYY-MM-DDTHH so that the user can request all events that occurred within that specific hour. This is the same format used for MDS events 1. Unlike in MDS this query parameter is optional and if not specified the API should return all events that occurred in the last 60 minutes. I'm also open to making the parameter required.

Is this a breaking change

  • Yes, breaking

Impacted Spec

  • Events

Additional context

Closes #107.

The events/events endpoint currently has no documented way to indicate
the time range for which data is being requested. This adds an
event_time query parameter to the API endpoint that takes the form
of an ISO 8601 UTC hour YYYY-MM-DDTHH so that the user can request
all events that occurred within that specific hour. This is the same
format used for MDS events [1].

[1]: https://github.com/openmobilityfoundation/mobility-data-specification/tree/2.0.1/provider#historical-events---query-parameters
@jiffyclub jiffyclub requested a review from a team as a code owner August 30, 2024 19:42
@CLAassistant
Copy link

CLAassistant commented Aug 30, 2024

CLA assistant check
All committers have signed the CLA.

@schnuerle schnuerle added this to the 1.1 milestone Nov 19, 2024
@mplsmitch
Copy link
Contributor

We will be discussing this at the Feb 25th CDS Working Group meeting. Please review and leave your comments and questions ahead of time.

@schnuerle
Copy link
Member

I recommend making this optional and non breaking so it stays in 1.1.

Should it be in our standard timestamp format, or is there a good reason to have it more human readable here?

@jiffyclub
Copy link
Contributor Author

For MDS we went with the ISO 8601 hour format in order to concisely specify an hourly range. Timestamps are more typically used to specify an exact time that we'd use with start_time and end_time parameters.

@schnuerle schnuerle merged commit 3ad929d into openmobilityfoundation:dev Jul 15, 2025
@jiffyclub jiffyclub deleted the event-time-query branch July 15, 2025 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants