REST
GET
request for the desired resource with any options specified as query parameters.POST
is used to create resources, PUT
to update them, and DELETE
for removal. POST
and PUT
requests usually have a request body to specify the contents of the resource that should be created or updated. In this case, the request body should be passed as JSON that closely matches the response format, although not all attributes will necessarily need to be specified.
Generally speaking, HTTP status codes are used appropriately for each response. For instance, 422 Unprocessable Entity
is given when validation fails for the given input.
The response format given by the web service is JSON, which is a lightweight data-interchange format. It's a simpler format than XML that also has the advantage of being used directly by the browsers' JavaScript implementations.