API Components
API Components
In this tutorial, we will understand the different API components. An API (Application Programming Interface) is a set of rules and protocols that allows different software applications to communicate and interact with each other. Think of it as a bridge that enables one piece of software to access the functionality or data provided by another.
APIs define how different software components should interact. They allow developers to build on existing services, integrate third-party applications, etc.
The main API components are as follows:
API Client
The application or service that initiates requests to an API server
API Request
Contains the operation to be performed, authentication details, parameters, and destination address
API Parameters
Parameters are the additional information passed in the request (e.g., query parameters, request headers.
API Body
The data is sent to the server to process. The usual formats are JSON, XML, and Protobuf.
API Server
Processes requests and returns appropriate responses. Some examples are as follows:
-
JBoss (WildFly) – A lightweight, flexible Java EE / Jakarta EE application server.
-
Apache Tomcat – A popular server for running Java Servlets and JSPs.
-
Node.js (Express, NestJS, Koa) – Widely used JavaScript runtime and frameworks for REST/GraphQL APIs.
-
Django (Python) – Full-stack framework with Django REST Framework (DRF) for APIs
API Endpoints
URLs representing specific resources (e.g., /users, /products)
API Methods
Actions can be performed on those endpoints (e.g., GET, POST, PUT, DELETE).
API Response
The data returned by the API. The usual formats are JSON, XML, and Protobuf.