We worked with APIs before, in Chapter 9, Shell, Git, Conda, and More – at Your Command, as clients. So, it would be safe enough to assume we have some idea about an API: it is just an interface that allows us to exchange data with the service. Technically, APIs can use any protocol or means of communication, and there are plenty of applications with all types of interfaces. However, these days, when people say API, they likely mean RESTful API. Here, the REST part stands for Representational State Transfer. REST is based on six guiding architectural principles, but what is more important for us is that it is based around HTTP requests, similar to the ones our browsers execute when we type in a URL.
Behind each RESTful API is a server—or, most likely, a group of servers—ready to execute the command; this command could serve the entire...