Public institutions, news portals, e-commerce or financial service providers – digital applications in all areas can no longer do without programming interfaces such as RESTful APIs. Because APIs provide a generally accepted, simple and robust standard for connecting systems in a scalable way in real time, interfaces are becoming increasingly important.
API stands for “application programming interface” and can be presented as a kind of mediator between two machines. Even though APIs are in principle not limited to use on the internet, in practice, interfaces are most frequently used where a web service wants to enable exchange with other web services.
A RESTful API refers to an interface programmed according to a certain paradigm. In contrast to other API formats such as SOAP, REST (“representational state transfer”) is one of the software architectures with the greatest scope for design and is therefore the most widely used.
The success of REST, which was presented in 2000, lies not only in the less strict structure but also in the fact that the majority of the necessary infrastructure (e.g. web and application servers, HTTP-capable clients, HTML and XML parsers) is already present in the architecture of the World Wide Web. These advantages make most web services essentially compatible with REST APIs.
An example of a REST API is the Twitter interface. For example, the interface can be connected to a website to generate the latest tweets. Website users could enter a search query or hashtag in an appropriate field, then Twitter will return the results in JSON format.
Other known web services with REST APIs are Facebook, Dropbox or Ebay.
A corresponding API documentation describes exactly how a RESTful API works and in which format the provider supplies data. The documentation contains information about the security-relevant authentication of the service being applied, and also in which format requests or responses must be structured or how errors are displayed.
References & PDF: