When two (or more) systems communicate with each other through an API, there is a protocol with pre-defined functions that make this communication possible. But, of course, there isn't just one way how systems transfer data and information. There are several types of APIs used for various use-cases, as we explained in our previous article. For every kind of API, there are specific protocols that define the rules for the accepted data types and commands. And today's the day where we give you some understanding of the beautiful world of API architecture.
Step-by-Step
Learning about API architecture is near as "easy" as learning how to build or repair a car. To call something a "car," the vehicle needs to fulfill certain conditions: having three to four tires, one wheel, and being moved by an engine or motor. Although the main parts "under the hood" of a car might be the same, there are already considerable differences in their structural engineering depending on their fuel sources (try comparing a gasoline-driven car with an electric one). And you can narrow the differences down even more. Meaning, you might get a bigger picture of cars in general, but it's an immense task to grasp everything about every single car existing.
It's the same here with APIs. So again, we won't be able to go into every detail on this matter, but we'll give you an overview of every significant aspect.
Types & Classes
In our previous article about APIs, we talked about the three main types of APIs:
But APIs can also be classified as:
For clarification: when we talk about "APIs," we usually mean "Web APIs" since this, from a developer perspective, is our main focus here. But what's so special about them? Well, applications that rely on APIs have traditionally been written in specific programming languages. But with the rise of the internet and cloud services, there've been a lot of changes. The massive advantage of Web APIs is that they can be accessed from any programming language and web pages created in HTML or with software generation tools.
Technically speaking, Web APIs usually send data back and forth using HTTP requests. These requests often return textual data in the form of a JSON or XML response - but that's a topic we'll cover in another article.
When talking about APIs, you'll instantly be confronted with the term "Web Services." Unfortunately, "APIs" and "Web Services" often get confused or even used interchangeably since they are overlapping tech terms. By definition, "Web Services" are software systems designed to support communication and interaction between two systems over a network. While APIs can use any protocols or design styles, web services usually use the SOAP protocol (but sometimes REST, UDDI, and XML-RPC as well). But again: "Protocols" will get their own article on here, so don't worry if you're overwhelmed by all those terms at the moment.
For now, you need to know that while all Web Services are APIs, not every API is a Web Service.
New to APIs? No worries! This beginner-friendly introduction demystifies APIs and their impact on digital products and services.
Read →Enter the fascinating world of API architecture, as we explore the protocols and data types that make system communication possible.
Read →Get a grasp on Neural Machine Translation. We delve into the basics of its architecture, enabling superior translation algorithms.
Read →