I have a rest webservice with an endpoint www.foobar.com/service.svc/MAC (migration authorisation code). Posting and getting to that adds and gets one MAC respectively. I now need to impliment a new enpoint for all MACs. What would that be? www.foobar.com/service.svc/MAC/All seems wrong. What would be correct and why?
|
|
|||
|
|
|
Here's what REST usually looks like
There are a few less used operations as well: |
|||||||
|
|
The following offers a suggested set of URI naming guidelines for REST services that have worked for me in practice.
|
|||
|
|
|
RESTful way for listing all MACs is:
Why? Well, because it's a convention and people expect REST service to behave that way. If you want to read more on that topic, check out how RESTful routing is done in Rails. |
|||
|
|
|
I posted a series of guidelines here: http://soaprobe.blogspot.co.uk/2012/10/soa-rest-service-naming-guideline.html These are being used effectively, where I work. UPDATE - I pasted the contents into another answer.... Robert |
|||||||
|
