This week I decided to dive more into APIs in general, not just RESTFUL APIs. So let us start at the beginning. API stands for Application Programming Interface, and it is an interface with a set(s) of functions. These functions allow programmers to use specific features or data of an application. A web API is an API that is accessed over the web, like through the HTTP protocol. The web API is a framework that assists in creating and developing HTTP based services.
An API usually works as follows, the client application initiates an API call, usually to retrieve information. This call is also known as a request. This request is then processed from the application to a web server using the API’s Uniform Resource Identifier, and usually has a request verb, like GET or POST, for example, headers, and a request body. After receiving a valid request from the application, the API makes a call to the web server. The server then responds to the API with the requested information, and the API then transfers the data to the initial requesting application.
APIs are often used for many reasons. This includes, but is not limited to, improving collaboration, offering easier innovation, data monetization (as money makes the world go round), and added security. APIs enable integration such that platforms and other applications can easily communicate with each other, allowing easier automation, therefore improving collaboration. They also offer flexibility, allowing connections to new businesses and reaching new markets, offering easier innovation. APIs are also often offered for free, usually initially, to allow the developers audience to grow so they can build relationships with their audience of developers around their brand for the future, securing future business partners, thus offering data monetization. Lastly, APIs create an added layer of security between your data and a server. Developers can also choose to add further security measures like tokens, signatures, and Transport Layer Security encryption, just to name a few.
There are also many types of APIs, some of which include, but are not limited to, SOAP, or Simple Object Access Protocol, XML-RPC, which is a protocol that relies on XML to transfer data, JSON-RPC, which uses JSON instead of XML for its work, and REST, which we have covered in prior weeks blog posts.
Source:
I decided to use the above source for this weeks blog post because they provided a ton of good information about APIs in general, and IBM is also a very well known company and therefore also a good reputable information source.
From the blog CS@Worcester – Erockwood Blog by erockwood and used with permission of the author. All other rights reserved by the author.