1. What is API?

API (Application Programming Interface) is a way for two software systems to communicate with each other.

Example:

Your React frontend needs student data from a Java backend:

React → API request → Java Backend → Database
React ← API response ← Java Backend

2. What is REST?

REST (Representational State Transfer) is an architectural style for designing web APIs using HTTP.

A REST API typically works with resources such as:

/users
/products
/orders

and HTTP methods such as GET, POST, PUT, DELETE.


3. REST Principles

Important principles: