Design RESTful service with multiple ids

Posted by Dustin Digmann on Stack Overflow See other posts from Stack Overflow or by Dustin Digmann
Published on 2012-07-03T02:54:40Z Indexed on 2012/07/03 3:15 UTC
Read the original article Hit count: 201

Filed under:

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?

© Stack Overflow or respective owner

Related posts about rest