This is first of a series of entries on understanding core concepts behind the technobabble developers speak.
API or Application Program Interface is a language that applications use to communicate with other applications or people.
In the context of modern applications you are most likely to face terms like RESTful API, HTTP API or WebSocket API.
REST stands for “representational state transfer” which is a perfect example of technobabble. The combination of words “representational state transfer” gives you precisely zero insight into what is it about. REST refers to an architecture of a web application. Think like baroque or modern for art but for websites. All REST applications are built on Hypertext Transfer Protocol (HTTP, a way of combining connections with the blue clickable text) and use some staple building blocks like Secure Sockets Layer (SSL) and Transport Layer Security (TLS). A REST application will throw at you familiar HTTP status codes like 401 if the requested page is not found.
If an API is the language of the application then RESTful API would be the English of the internet.
However, there are some limitations to the HTTP protocol RESTful API’s rely on. One of the principles of the HTTP protocol is one connection - one interaction. Which means each request-response interaction requires a separate connection.
So REST-API is like English, but you can talk it only walkie-talkie mode.
The other one API type is a WebSocket API. It works like a phone instead of a walkie-talkie. One connection opens a steady channel that allows two-directional communication. The WebSocket API is what you use for computer games, chats and everything else that requires a real-time update.