-: (Memi) So let's talk about what is an API.
As you probably remember,
the title of this course is about REST API.
So we'll talk about REST later.
Let's begin with the API part.
So API is an acronym of Application Programming Interface.
Now if it doesn't make sense to you
then let's look at the Wikipedia explanation of API.
So according to Wikipedia
an API is a set of clearly defined methods
of communication among various components.
Now notice that the components part
in this explanation refers to software components.
But first,
let's talk about the interface part of the API.
You're probably familiar with user interface.
User interface is what you the user,
sees when you look at something.
In the case of websites,
it's probably the homepage of the websites
that you are browsing to.
So interface is the part that is exposed to you the user.
And the word exposed here is very,
very important as we will see later.
So this is a part that is exposed
to you when you try to use something.
And as an end user or as a human,
the interface is a visual representation
of the content that you are looking at.
The same is also true for application interface.
In application interface,
the interface is the part that is exposed to an application
not to an end user.
And what you see right now
on the screen is a specific kind of an API
or an interface
that is exposed by an application.
Now you the end user,
the human,
you are not supposed to ever see this kind of API.
It makes no sense.
It has a lot of letters, a lot of numbers, some slashes,
and it basically completely incomprehensible for humans.
But application fully understands this.
Now take a look at the first line of this API.
This is the address of the API.
This is the address of the interface that
the application is going to use.
And this is the main part we are going to deal with
in this course.
But again before,
we are going to dive into the REST API,
or into web API.
Let's first understand what is the terminology
that we are going to use when talking about API.
So in this example,
we have two softwares.
We have users management software,
and we have orders management software.
And those two softwares,
they want to communicate with each other.
For example,
the users software wants to access the orders software
and ask it what are the orders that were made
by a specific user.
So in order to do that,
the users software goes to the orders software.
With this question.
I want to get the users orders.
Now how does the users software talk to the orders software?
The order software publishes an API.
The API is the thing that the users software can see
and access and use it in order to get access
to the internal data stored in the orders software.
Now this kind of API publishing
called exposing an API.
The API is exposed by the orders management software
and after it is exposed and becomes public
then other software or other software components can use it.