Clarify trips and status changes response behavior#563
Merged
schnuerle merged 1 commit intoopenmobilityfoundation:devfrom Nov 18, 2020
Merged
Clarify trips and status changes response behavior#563schnuerle merged 1 commit intoopenmobilityfoundation:devfrom
schnuerle merged 1 commit intoopenmobilityfoundation:devfrom
Conversation
Member
|
This seems like a good idea and change. Would like some community feedback on it and the wording. |
Contributor
|
👍 to this. As an agency, it is a real problem to request a time range and not know if we should move on because there are no events there, or retry later because there is an error / the data is incomplete. |
In MDS 0.4.x we request trips and status changes for a given hour. A provider may have no data to report for the requested hour multiple reasons, including: - The hour has not yet fully passed - The provider was not operational in the region during the hour - The provider has not yet completed processing that hour's data - No trips or events occurred during the hour Differentiating the last two reasons is particularly important because it lets consumers of APIs know whether or not they need to re-request the hour at a later time. A successful 200 response with an empty list of data clearly communicates that the provider has nothing to report for that hour and that it's not necessary to try again later. Having this behavior consistent across providers would help us at Populus spend less time requesting data and reduce the number of requests received by providers.
3e64f06 to
b07bb80
Compare
Contributor
Author
|
Bumping this to get it included in the 1.1.0 release. |
Member
Collaborator
|
Updated target branch to |
schnuerle
approved these changes
Nov 18, 2020
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.
In MDS 0.4.x we request trips and status changes for a given hour. A provider may have no data to report for the requested hour for multiple reasons, including:
Differentiating the last two reasons is particularly important because it lets consumers of APIs know whether or not they need to re-request the hour at a later time. A successful 200 response with an empty list of data clearly communicates that the provider has nothing to report for that hour and that it's not necessary to try again later. Having this behavior consistent across providers would help us at Populus spend less time requesting data and reduce the number of requests received by providers.