RESTful APIs

REpresentational State Transfer (REST) is an architecture style that relies on six guiding constraints: stateless, client-server, cacheable, layered system, code on demand (optional), and uniform interface. Web service APIs that adhere to the REST architecture are called RESTful APIs.

Many modern internet applications, such as Microsoft Azure, Twitter, LinkedIn, Google, PayPal, and Amazon, use the RESTful architecture style in their APIs, which allows easy integration over the HTTP communication protocol. The primary reason RESTful APIs are useful in cloud and web applications is that the calls are stateless. This means each request or interaction is independent. Nothing has to be saved that has to be remembered by the next request, and any request can be directed to any instance of a component.

A RESTful API explicitly takes advantage of HTTP methodologies. They use GET to retrieve a resource, PUT to update a resource, POST to create that resource, and DELETE to remove it. A resource can be an object, file, or a table row in a database. HTTP-based RESTful APIs are defined by the following key aspects:

  • Base URL: Such as http://YourWebApplicationAPIURL/
  • Media type: Such as application/JSON and application/XML
  • Standard HTTP methods: Such as GET, PUT, POST, and DELETE
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.21.229