User:Nicholsr/REST

RESTful Web services
A RESTFul web service is a simple web service implemented using HTTP and the principles of REST. Such a web service can be thought about as a collection of resources. The definition of such a web service can be thought of as comprising three aspects:


 * The URI for the web service such as http://example.com/resources/cars
 * The MIME type of the data supported by the web service. This is often JSON, XML or YAML but can be anything.
 * The set of operations supported by the web service using HTTP methods including but not limited to POST, GET, PUT and DELETE.

Members of the collection are addressed by ID using URIs of the form /. The ID can be any unique identifier. For example if a RESTFul web service representing a collection of cars for sale might have the URI http://example.com/resources/cars. If the service uses the car registration number as the ID then a particular car might be present in the collection as http://example.com/resources/cars/yxz123

The following table shows how the HTTP verbs are typically used to implement a web service.