New answers tagged http
404 indicates a resource is not found. A more appropriate response code would be a 409 with a body containing more details if the nature of the conflict.
404 means resource not found. Using it here would be not appropriate. Because the resource clearly exists, but cannot be manipulated. According to Quick Tips (http://www.restapitutorial.com/lessons/restquicktips.html) 409 Conflict would be a good way to go. You can of course return 200 with error message in the body. The client is still responsible for ...
The resource for "About Us" is ... Us :) er, You. Think about the attributes of You that you want to publicize, and roll those up as a noun with a representation. Those values don't have to come from a database... it will probably be a bunch of string values, and those can come from config, or maybe even hard-coded in a class.
I would keep my view's independent of the back-end. You can ask the back-end for resources such as things that go on the accordion, the navigation bar, and other objects that pertain to the body. However, you should leave the processing of these resource representations to your client code, which will eventually render them as per the requirements.
I would prefer to design these as subresources, onto which you perform a POST request. Consider you have a resource at /instance/type/1, I would have the representation of that resource convey a couple of links to 'actions' that can be performed on the resource, such as /instance/type/1/draft and /instance/type/1/curate. In JSON, this could be as simple as: ...
Top 50 recent answers are included