I have a REST URL to get all users formatted like this: http://example.com/users
To get an individual user by id: http://example.com/users/12345
To get all user's bids: http://example.com/users/12345/bids
To get all user's bids between two dates: http://example.com/users/12345/bids/?start=01/01/2012&end=01/31/2012
or should it be like this: http://example.com/users/12345/bids/start/01012012/end/01312012
I'm leaning towards the 1st date range URL as start and end are not entities in the domain. What is the proper way to format a REST URL with a date range?
Thanks,
Tom
/
to delimit the values you're likely to encounter numerous issues. If you decide you want the start and end dates to allow ISO formats e.g.2021-10-12T01:00:00.000Z
,2021-10-01T18:00:00.000+05:00
, those formats contain characters that will break the URL. Much better to use querystring parameters