General RESTful API HTTP Methods

For background on RESTful APIs in general, see Wikipedia or another suitable reference.

If you want to … Then you should …
fetch all instances of the resource GET /api/resource
fetch an instance of the resource GET /api/resource/:id
create a new resource POST /api/resource
update an existing resource PUT /api/resource/:id
delete an existing resource DELETE /api/resource/:id 

If your HTTP client does not implement the PUT and DELETE methods, you can alternatively submit a POST with an additional parameter named _method and a value of either PUT or DELETE.

For example, to delete a task using the POST method rather than the DELETE method, do:

% curl -X POST
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request