What Is An API
What Is An API
Imagine you’re sitting at a table in a restaurant with a menu of choices to order from. The
kitchen is the part of the “system” that will prepare your order. What is missing is the critical
link to communicate your order to the kitchen and deliver your food back to your table.
That’s where the waiter or API comes in. The waiter is the messenger – or API – that takes
your request or order and tells the kitchen – the system – what to do. Then the waiter
delivers the response back to you; in this case, it is the food.
Here is a real-life API example. You may be familiar with the process of searching flights
online. Just like the restaurant, you have a variety of options to choose from, including
different cities, departure and return dates, and more. Let us imagine that you’re booking
you are flight on an airline website. You choose a departure city and date, a return city and
date, cabin class, as well as other variables. In order to book your flight, you interact with
the airline’s website to access their database and see if any seats are available on those
dates and what the costs might be.
However, what if you are not using the airline’s website––a channel that has direct access
to the information? What if you are using an online travel service, such as Kayak or
Expedia, which aggregates information from a number of airline databases?
The travel service, in this case, interacts with the airline’s API. The API is the interface
that, like your helpful waiter, can be asked by that online travel service to get information
from the airline’s database to book seats, baggage options, etc. The API then takes the
airline’s response to your request and delivers it right back to the online travel service,
which then shows you the most updated, relevant information.
APIs have become so valuable that they comprise a large part of many business’ revenue.
Major companies like Google, eBay, Salesforce.com, Amazon, and Expedia are just a few
of the companies that make money from their APIs. What the “API economy” refers to is
this marketplace of APIs.
• Modern APIs adhere to standards (typically HTTP and REST), that are developer-
friendly, easily accessible and understood broadly
• They are treated more like products than code. They are designed for consumption
for specific audiences (e.g., mobile developers), they are documented, and they
are versioned in a way that users can have certain expectations of its maintenance
and lifecycle.
• Because they are much more standardized, they have a much stronger discipline
for security and governance, as well as monitored and managed for performance
and scale
• As any other piece of productized software, the modern API has its own software
development lifecycle (SDLC) of designing, testing, building, managing, and
versioning. Also, modern APIs are well documented for consumption and
versioning.
Słowniczek:
retrive – odbierać
perform – wykonywać
variable – zmienna
maintenance – utrzymanie
governance – zarządzanie
versioning – wersjonowanie
Źródło:https://www.mulesoft.com/resources/api/what-is-an
api#:~:text=API%20is%20the%20acronym%20for,you're%20using%20an%20API.