Design RESTful service with multiple ids
- by Dustin Digmann
I am designing a RESTful service. It is to list a set of data. The main problem is that the set does not have a reasonable, single identifier. Nor can the specific set be easily calculated within the knowledge of the system. As a result, it does not seem possible to have a GET /items/{identifier} service.
I do have the id of each element being requested. My main issue is that it does not seem RESTful to list the ids in the URI (eg GET items/{id1},{id2},...,{idn} ). Right?
I could see DELETE having a similar use case - remove multiple items in one request cycle.
How would such a use case be satisfied while staying within the REST realm? Is that possible?