REST

Representational State Transfer (REST) is an abstraction of the World Wide Web.

A web service is "RESTful" if it conforms to the following constraints:

Whereas SOAP is a protocol, REST is an architectural style. As such, there is no "official" standard for RESTful web APIs. Nevertheless, a RESTful implementation such as the Web can use standards like HTTP 30 , URI 30 , XML 30 , etc.

Under the uniform interface constraint, resources are identified by URIs, and standard HTTP methods (GET, POST, PUT, DELETE) act on those resources. A GET request against a resource's URI, for example, can return an XML representation of that resource:

Request:

GET /books/123321 HTTP/1.1
Host: api.example.com
Accept: application/xml

Response:

HTTP/1.1 200 OK
Content-Type: application/xml

<book id="123321">
   <title>Harry Potter</title>
   <author>J. K. Rowling</author>
   <price>22.90</price>
</book>