Designing a RESTful Web Application
quandyfactory.com
Designing a RESTful Web Application
1–10 of 24 posts
Re: Designing a RESTful Web Application
#2But more trouble than they are worth if you want fairly custom url schemes and are doing something a bit more useful then just plain old CRUD.
Re: Designing a RESTful Web Application
#3Re: Designing a RESTful Web Application
#4Re: Designing a RESTful Web Application
#5http://roy.gbiv.com/untangled/2008/rest-apis-must-be-hyperte...
Re: Designing a RESTful Web Application
#6So what URL do I use if I want to search articles? What if I want to approve articles? The simple CRUD perspective has fallen apart for me pretty quickly in practice- I need more than 6 verbs (adding HTTP OPTIONS and HEAD in there). I think HATEOAS is a pretty good approach, but there still seems to be a lot of noun-ification going on in RESTful apps just to stick with the style. (e.g, PUT //article/1234/approval used when disapproving an article)
Re: Designing a RESTful Web Application
#7Re: Designing a RESTful Web Application
#8"For example, if you want to add the ability to create an article, it might be tempting to create a URI called /create_article/. This is wrong, because it conflates the object (the resource) and the action (creation)." So what URL do I use if I want to search articles? What if I want to approve articles? The simple CRUD perspective has fallen apart for me pretty quickly in practice- I need more than 6 verbs (adding H…
Approving articles could be as simple as posting TRUE to the "approved" attribute of an article, ie, /articles/1234/approved
You just need to make sure that every resource that can be modified or retrieved has a URL.
Re: Designing a RESTful Web Application
#9another nit: GET requests are idempotent, but that's a necessary, not sufficient, condition. You should just say they have no side effects.