Website vs Web API / Web Service
Website = for people Web API = for software
Website Web API / Web Service
Imagine any online shop Website A Web API is what applications talk to
A website is what humans see Designed for programs
Designed for browsers Returns data (JSON / XML)
Returns HTML pages
Example: Example:
[Link] (you click, scroll, read) [Link] (apps fetch data silently)
What is a Web Service?
A Web Service is: A way for two systems to talk over the internet.
Using HTTP Without knowing each other’s internal code.
Example:
Java app → calls API → gets JSON → uses it
REST vs SOAP
SOAP - Complex REST - Simple
Legacy systems Modern apps
Old, Heavy, Strict Modern, Simple, Popular
Think of SOAP like: Think of REST like:
A government office form WhatsApp message
Very strict rules Simple request, quick response
Lots of envelopes and paperwork
Uses XML only Uses JSON mostly
Very strict structure Lightweight
Heavy & slow Easy to read
Harder for beginners Fast
Still used in banks / legacy systems Used everywhere (mobile, web, cloud)
What is WebAPI testing tools?
Postman/SOAP UI/Insomnia/Hoppscotch/HTTPie is:
Used to test APIs without writing code
Why we use Postman?
Send GET / POST / PUT / DELETE
See response instantly
Debug APIs before coding
Simple explanation:
“Before writing Java code, we first check if the API is alive using Postman.”
Free Public APIs for Practice (SAFE + NO LOGIN)
Beginner Friendly APIs
[Link]
Best for (Create, Read, Update, Delete) CRUD practice
[Link]
(Login, users, pagination)
[Link]
(Products, carts, users)
[Link]
(List of free APIs)
[Link]
(E-commerce simulation)
Slightly Advanced
[Link]
[Link]
[Link]
[Link]
[Link]
Practice Exercises
Exercise 1 – GET Request Goal: Fetch users
API: [Link]
Task: Call in Postman
Identify:
Id, name, email
Exercise 2 – POST Request Goal: Create user
API: [Link]
Method: POST
Body (JSON):
{
"title": "Java Student",
"body": "Learning REST API",
"userId": 1
}
Explain: Server accepts data and responds back.
Exercise 3 – Java Side
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
[Link]
Summary
REST APIs allow Java applications to talk to other systems using simple HTTP calls and JSON.