I\'m having a real hard time conceptually understanding something proper concerning URLs for versioned resources.
Let\'s say I have an application that tracks recipes in
I have a use case where the creation time of each version is crucial. So common questions that the API must answer are:
/recipes/ultimate-thing
?/recipes/ultimate-thing
was the most recent on 2019-01-01?/recipes/ultimate-thing
were created between 2019-01-01 and and 2019-01-31?Number 3. seems to me an obvious case for for query parameters:
-- /recipes/ultimate-thing?versions_since=2019-01-01&versions_until=2019-01-31
It will probably not hurt to use the same approach for 2.:
-- /recipes/ultimate-thing?version=2019-01-01
Then let's be consistent and use the same approach for 1.:
-- /recipes/ultimate-thing?version=latest
From this point of view your option 1) - using query parameters - seems most natural.