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
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.
Important principles: