Add event_time query parameter to events endpoint#140
Merged
schnuerle merged 1 commit intoopenmobilityfoundation:devfrom Jul 15, 2025
Merged
Add event_time query parameter to events endpoint#140schnuerle merged 1 commit intoopenmobilityfoundation:devfrom
schnuerle merged 1 commit intoopenmobilityfoundation:devfrom
Conversation
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
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. |
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? |
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explain pull request
The
events/eventsendpoint 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_timequery parameter to the API endpoint that takes the form of an ISO 8601 UTC hourYYYY-MM-DDTHHso 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
Impacted Spec
EventsAdditional context
Closes #107.