RESTful design for an endpoint to filter and return only the latest created resource
问题 I have an application where a user can create many subresources for a given one. Let's say the endpoint looks like this: POST /main-resources/{id}/sub-resources The subresource contains a period of time limited by dates as part of the body, something like: { "startDate": "2018-10-10", "endDate": "2018-12-12" } They are also consider value objects. In terms of the application, they don't have an id (even though they are backup by a SQL database so effectively they have one) as it doesn't make