REST design: what verb and resource name to use for a filtering service

Posted by kabaros on Stack Overflow See other posts from Stack Overflow or by kabaros
Published on 2012-11-03T21:07:02Z Indexed on 2012/11/03 23:01 UTC
Read the original article Hit count: 156

Filed under:
|

I am developing a cleanup/filtering service that has a method that receives a list of objects serialized in xml, and apply some filtering rules to return a subset of those objects.

  1. In a REST-ful service, what verb shall I use for such a method? I thought that GET is a natural choice, but I have to put the serialized XML in the body of the request which works but feels incorrect. The other verbs don't seem to fit semantically.

  2. What is a good way to define that Service interface? Naming the resource /Cleanup or /Filter seems weird mainly because in the examples I see online, it is always a name rather than a verb being used for resource name.

  3. Am I right to feel that REST services are better suited for CRUD operations and you start bending the rules in situations like this service? If yes, am I then making a wrong architectural choice.

  4. I've pushed to develop this service in REST-ful style (as opposed to SOAP) for simplicity, but such awkward cases happen a lot and make me feel like I am missing something. Either choosing REST where it shouldn't be used or may be over-thinking some stuff that doesn't really matter? In that case, what really matters?

© Stack Overflow or respective owner

Related posts about rest

Related posts about restful-architecture