REST

Representational state transfer (REST) is a style of architecture for distributed systems in which requests and responses contain representations of the current state of the system’s resources. The core technologies employed in the World Wide Web, including the HTTP protocol and the format of URLs, conform to the REST architectural style.

Although URLs containing parameters within the query string do themselves conform to REST constraints, the term “REST-style URL” is often used to signify a URL that contains its parameters within the URL file path, rather than the query string.

For example, the following URL containing a query string:

http://wahh-app.com/search?make=ford&model=pinto

while following URL containing “REST-style” parameters:

http://wahh-app.com/search/ford/pinto

REST API

RESTful API is an application program interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. … REST technology is generally preferred to the more robust Simple Object Access Protocol (SOAP) technology because RESTleverages less bandwidth, making it more suitable for internet usage.

REST Example

Open the following link in your browser to request a random programming joke:

https://official-joke-api.appspot.com/jokes/programming/random

This is a public API implemented as RESTful web service (it follows REST conventions). Your browser will show an awful JSON-formatted programming joke, such as:

[
  {
    "id": 29,
    "type": "programming",
    "setup": "There are 10 types of people in this world...",
    "punchline": "Those who understand binary and those who don't"
  }
]