Congratulations for completing this resource! Mark it as completed to track your progress.
APIs have become the center of software development, connecting and transferring data to millions of applications every day.
The guide covers simple explanations of all basic concepts of APIs as well as the most common and, more importantly, a list of popular APIs that you can use to improve your applications.
API stands for - .
It’s a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. Basically, it enables apps to and easily and securely.
It lets your product or service communicate with other products or services without having to know how they’re implemented.
Imagine you’re sitting at a table in a restaurant with a menu of choices to order from. The is the part of the 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 or 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 back to you; in this case, it is the food.
APIs sit between an and the web server, acting as an intermediary layer that processes data transfer between systems.
A client application initiates an to retrieve information, also known as a request. This request is processed from an app to the web server via the API’s Uniform Resource Identifier (URI) and includes a request verb, headers, and sometimes, a request body.
After receiving a valid request, the API makes a call to the external program or web server.
The server sends a response to the API with the requested information.
The API transfers the data to the initial requesting application.
While the data transfer will differ depending on the web service being used, this process of requests and responses all happens through an API.
Whereas a user interface is designed for use by humans, are designed for use by a computer or application.
REST stands for
The REST architecture is the most popular approach to build APIs.
REST relies on a approach, which separates front and back ends of the API, and provides considerable in development and implementation.
This means the implementation of the and the implementation of the can be done independently without each knowing about the other.
APIs that adhere to REST principles are called .
A system consists of a:
In the architecture, send requests to retrieve or modify resources, and send responses to those requests.
By using a , different clients hit the same REST endpoints, perform the same actions, and receive the same responses.
requires that a client make a request to the server in order to retrieve or modify data on the server.
A request generally consists of:
CRUD Stands for
In a REST environment, CRUD often corresponds to the HTTP methods GET, POST, PUT/PATCH, and DELETE.
In regards to its use in RESTful APIs, CRUD is the standardized use of HTTP Action Verbs.
This means that if you want to create a new record you should be using . If you want to read a record, you should be using . To update a record use or , And to delete a record, use .
Let’s learn about HTTP verbs, There are many HTTP verbs we use in requests to interact with resources in a REST system:
HTTP defines a set of request methods to indicate the desired action to be performed for a given resource.
These request methods are referred to as .
Below are the various types of HTTP Verbs:
The method is used to retrieve a specific resource. Requests using should only retrieve data and should have no other effect on the data.
Same as , but doesn’t have a message-body in the response. The method is useful in recovering meta-data that is written according to the headers, without transferring the entire content.
A request is utilized to send data to a server to create a resource, for example, customer information, file upload, etc., usually using HTML Forms.
is similar to as it is used to send data to the server to create or update a resource. The difference between them is that replaces all current representations of the target resource with the uploaded content.
As it sounds, the request method is used to delete resources indicated by a specific URI. Making a request will remove the targeted resource.
request establishes a tunnel to the server identified by a specific URI. A good example is SSL tunneling.
The method requests permitted communication options for a given URL or server. A client can specify a URL with this method, or an asterisk (*) to refer to the entire server.
The method performs a message loop-back test along the path to the target resource, to provide a useful debugging mechanism. It allows clients to view whatever message is being received at the other end of the request chain so that they can use the info for testing or diagnostic functions.
The method is used for making partial changes to an existing resource. The method provides an entity containing a list of changes to be applied to the resource requested using the URI.
The method uses the request URI to supply a modified version of the requested resource which replaces the original version of the resource, whereas the method supplies a set of instructions to modify the resource.
Status codes are issued by a server in response to a client’s request made to the server.
The first digit of the status code specifies one of five standard classes of responses.
It indicates that the request was received and understood by the server, and it is continuing the process.
It indicates that the action requested by the client was received, understood, and accepted.
This status code is intended for situations in which the error seems to have been caused by the client.
It indicates that the server has encountered a situation where it doesn’t know how to handle a request.
These were not all the status codes that exist, there are many more status codes that indicate different things.
You can find and learn more about on this website (link below) with detailed information about each status code.
is a comprehensive API marketplace that offers a vast collection of free and freemium APIs across various categories, including , , , and more. Developers can explore and integrate these APIs into their applications to enhance functionality and user experience.