Representational State Transfer (REST) API

From GM-RKB
(Redirected from REST API)
Jump to navigation Jump to search

A Representational State Transfer (REST) API is an application programming interface that uses a Representational State Transfer Pattern.



References

2023

  • chat
    • Q: What is a representational state API? Provide some examples?
    • A: A Representational State Transfer (REST) API is a type of web API that uses HTTP requests to GET, PUT, POST, and DELETE data. REST is a stateless, client-server architecture that uses a uniform interface, which makes it simple and flexible. REST APIs are widely used because they can be easily consumed by various client applications, including web, mobile, and desktop applications.
    • Some examples of REST APIs include:
      • Twitter API: Allows developers to access Twitter data and functionality, such as posting tweets and reading user timelines.
      • Google Maps API: Enables developers to integrate Google Maps functionality into their applications, such as displaying maps and searching for locations.
      • Facebook Graph API: Provides access to Facebook's social graph, allowing developers to retrieve information about users, pages, and posts, as well as publish content on behalf of users.
      • Amazon S3 API: Allows developers to store and retrieve data in Amazon's Simple Storage Service (S3), a highly scalable and durable object storage service.
      • GitHub API: Provides access to GitHub's vast repository of open-source code, allowing developers to search for and retrieve information about repositories, users, and commits.
    • These are just a few examples of the many REST APIs available today, which allow developers to build a wide range of applications and services by accessing and leveraging the functionality and data of other systems.

2017

  • (Wikipedia, 2017) ⇒ https://en.wikipedia.org/wiki/Representational_state_transfer Retrieved:2017-4-25.
    • Representational state transfer (REST) or RESTful Web services are one way of providing interoperability between computer systems on the Internet. REST-compliant Web services allow requesting systems to access and manipulate textual representations of Web resources using a uniform and predefined set of stateless operations. Other forms of Web service exist, which expose their own arbitrary sets of operations such as WSDL and SOAP. "Web resources" were first defined on the World Wide Web as documents or files identified by their URLs, but today they have a much more generic and abstract definition encompassing every thing or entity that can be identified, named, addressed or handled, in any way whatsoever, on the Web. In a RESTful Web service, requests made to a resource's URI will elicit a response that may be in XML, HTML, JSON or some other defined format. The response may confirm that some alteration has been made to the stored resource, and it may provide hypertext links to other related resources or collections of resources. Using HTTP, as is most common, the kind of operations available include those predefined by the HTTP verbs GET, POST, PUT, DELETE and so on. By making use of a stateless protocol and standard operations, REST systems aim for fast performance, reliability, and the ability to grow, by re-using components that can be managed and updated without affecting the system as a whole, even while it is running. The term representational state transfer was introduced and defined in 2000 by Roy Fielding in his doctoral dissertation. Fielding used REST to design HTTP 1.1 and Uniform Resource Identifiers (URI). The term is intended to evoke an image of how a well-designed Web application behaves: it is a network of Web resources (a virtual state-machine) where the user progresses through the application by selecting links, such as /user/tom, and operations such as GET or DELETE (state transitions), resulting in the next resource (representing the next state of the application) being transferred to the user for their use.