Apr 14 2022

What Is an Api Contract

So, first of all, I just want to talk about this, this is one, Gartner actually took this phraseology from my presentation, which is that if you think about the cloud that`s between the smartphone, and what`s our icon for the server here, isn`t it, in this role, we`re all used to using it, No? They all have one. And it has a user interface, and it`s meant for a human being, right? You all know how to use it, you know how to touch it, you know how to scroll through it, you know how to use the apps that are here. And it`s pretty intuitive, or in some cases not, but you can understand it. And it`s a user interface. It is designed for human consumption. And in this role, when you`re actually using your smartphone, at some point, it communicates with another server that`s on the other side of the cloud on the Internet. The only difference between what you do with your smartphone and what an API is, and by the way, they are API, is involved when you do these things is that the machine is also a user. But the user interface needed to communicate with the server on the other side simply needs to be designed for a machine to consume it instead of a human consuming it. But just to give you an example. I looked at the name of this meeting. I thought, wait a minute, what is the name of the Meetup? And that`s the DC Web API Meetup, right? And that`s what he says about meetup.com. And I found it really interesting that the word web is in it. It`s actually not the MEETUP DC API, it`s the MEETUP WEB API.

And there was something that happened, that is important in the arc of API history, where the web was involved, that introduced even better decoupling, and it was important to know how we got to where we are today. And I want to talk a little bit about that. It should be, “Why are APIs driving the digital transformation of organizations and the reinvention of businesses?” This is where you enter the realm of why it`s really relevant for business people to understand how APIs can benefit the business and transform the business. Because every company has to go through these changes if it wants to remain competitive in the new world. “What are the different business models?” In fact, I cannot even answer that question at the moment, because we are in the process of finalising this report. But the definitive reference for business models for APIs is a presentation given to programmableweb founder, a gentleman named John Musser. And the title of the presentation, you can search for it, you can google it, it`s “20 API BUSINESS MODELS in 20 minutes”. And people see this as a kind of reference reference on how to understand different business models.

Well, it turns out that it was released in 2013. So a lot of time has passed, especially in the Internet years, and things have changed. So we`re releasing a brand new comprehensive guide to all the different business models and what makes them different. So in this case, instead of “getting customer information, you can simply issue an order that is “get”. Get is one of the verbs, they call them verbs, of the HTTP protocol. If the consumer now sends a request to the supplier, it is up to the supplier to know what to do with it. As part of the ongoing series of on-demand replays of ProgrammableWeb presentations taking place at the monthly API meeting in Washington, D.C. (anyone can attend), this article provides a recording and full transcript of the DES API 101 presentation I gave on December 5, 2019.

This is the first of a long series of 101 courses that I will give at the meeting. In the presentation, I discuss how the API contract essentially separates the API consumer from the API provider and the flexibility that comes with this decoupling. Well, it gives organizations the power to make these substitutions. Maybe this IBM mainframe is exaggerated and no longer worth it. And maybe you could offer consumers the same contract with something much more profitable, like a Linux server running in the Amazon cloud. This is the real power. This could transform a company that can change the bottom line in a way that is incredibly important to the business and makes it more profitable, gives it more control over its future, and makes it more competitive in the market it operates in because it now has more capital to work with, rather than capital. that it only wastes on a large mainframe. Not that mainframes are a big waste of money. But here too, it is the Treaty that makes this possible. Because the backend and frontend are completely decoupled from each other.

The contract is defined by the service providers and is intended for API consumers, in other words, companies and developers who will use the API. The document is usually created by the development team. If a developer has full domain knowledge, they may be able to create the documentation on their own. Otherwise, he might need the help of an expert in the field. I`m good at regularly questioning what I mean when I use certain phrases. I found myself repeating and reusing many hollow, empty, and meaningless phrases during my decade as an IPA evangelist. One of these expressions is “an API contract”. I use it a lot. I hear it a lot. What exactly do we mean by that? What is an API contract and how does it distinguish or resemble our beliefs and understanding of other types of contracts? Is this the truth or is it just a way to convince people that what we are doing is just as legitimate as what happened before? Perhaps it is even more legitimate, as in a kind of blockchain? It`s an irreversible, unbreakable digital contract, think Bro! Well, if you have children like me, I have four children, that`s the novelty.

Oh, it`s not really new anymore. But when you go there, at Christmas time, you go to the store and you want to buy a gift, and you see it on the shelf. And you can tell that LEGO has moved away from this idea of a contract. Because one of the great benefits of decoupling, as I said, is that you don`t care. Everything works together in one way or another, no matter what. And all of a sudden, you get something like that, and there`s a part like this that comes with it. And you think, Jesus, you know what? This thing only works on this plane. It is completely related to this design.

And you can`t really use it anywhere else. The contract is actually in the buttons there. But good luck with this that really works with your other LEGO pieces. So, in a way, it`s still decoupled because the buttons match the contract, but it`s not in the true spirit of what LEGO was long ago. It really only fits into this plan. Now, maybe some creative kids will find another way to integrate this into something else. And that`s because the contract there still shows up a little bit in the buttons. Let`s take another example here, namely LEGO, which is probably the most commonly used analogy for APIs, as it turned out that APIs were like building blocks.

And it turns out that there is a very strict technical contract when it comes to LEGO in terms of the size of the buttons on the small blocks. And that shows you a little bit about what that specification is, but it`s a contract. And anyone who has ever worked with LEGO knows that if you buy one of the fake LEGO manufacturers and try to grab it, it won`t fit as perfectly as a real LEGO block. Right? And that`s because they don`t quite have the contract. And that`s probably because there`s one thing with intellectual property that prevents them from copying the contract. But the fact is that there is a contract there. And you basically have a seller of a nubbe and a consumer of nubbe in a way that decouples and separates the concerns of the two blocks. All they are interested in is that the supplier and the consumer respect the contract. “How and why should you produce APIs?” and “What are the different API security issues and how can you address them?” And: “What is API First Design and why is it important?” That`s what I`ve gotten on the list so far, but it`s going to expand. Because as we go along, people will have questions and say, “Hey, you made a presentation on X,” and so I`m going to add it to the curriculum. Creating a definition for your API is an important step in API development that is often overlooked.

API definitions (sometimes called API specifications or description formats) are designed to provide a format for describing APIs that computers can read. They are language-independent, so you can benefit from them, no matter what language you choose. Because these specifications are quite static, they provide information about what an app can do, but not necessarily what it can do. For example: Well, a really basic part of it, and some of you are of course very familiar with this, is that an app often outsources a function to an API. And we often call it “calling” the API. It`s like picking up the phone and making a call. Only this time, the software will call the API and the API will respond with what you want it to answer. When you call up the Google Maps API, it responds with an actual map that is painted on your screen. So, if you`re used to using Uber or Lyft, you`ll see that the cards appear directly in the app.

You call the API of a mapping API provider. You may be calling the API for something like a patient record. I think we had someone here with Medicare and Medicaid, so you know everything about that kind of thing, right? As I said, a pin on a map that this feature is provided by Google Maps. .

Comments are closed.