Path Paremeter - Identify Specific Resource.
Query Parameter - Is used to for sorting and filtering
https://shoeshop.com/categories/boots?color=black&size=10&sort=price&order=asc
https://www.example.com/path/to/resource?search=query#section1
Fragment:shows to a specific
section of the resource.
Uniform Resouce Name
Tools for API Tesing
1) Postman
2) Swagger
3) Jmeter
4) Insomnia
5) Katalon
Introduction to Postman -
Postman is a software application that allows developers and
Testers to test and share APIs.
Features of Postman
User-Friendly Interface
Collection Management
Environment Management
Testing and Automation
Mock Servers
Collaboration
Monitoring
Integration - CI/CD pipelines, GitHub, Jenkins.
• Installing Postman
• Postman UI Overview
Getting Started with Postman
• • Creating First Request (GET, POST, PUT, DELETE)
• • Understanding Request Structure
• • Sending Requests and Analyzing Responses
CRUD Operation - (CREATE , READ, UPDATE AND DELETE)
HTTP METHODS:
GET - GET Method is used to retrive the date from the server
POST-Post method is used to create a new on the server
PUT- Put method is used update the data already existing on the server
PATCH- Patch is used to partial Update the data already existing on the server
DELETE - Delete is used to delete the data from the server.
Question : What is difference between Put Patch and Post
GET - GET Method is used to retrieve the data from the server
USERS
BRAND
https://automationexerci
se.com/api/productsList PRODUCT
"products": [
"products": [ {
{ "id": 1,
"id": 1, "name": "Blue Top",
"name": "Blue Top", "price": "Rs. 500",
"price": "Rs. 500", "brand": "Polo",
"brand": "Polo", "category": {
"category": { "usertype": {
"usertype": { "usertype": "Women"
"usertype": "Women" },
}, "category": "Tops“
"category": "Tops“ ……………………..
……………………..
JSON stands for JavaScript Object Notation. It is a lightweight format for data
exchange, which makes data transmission faster. JSON is widely used because
of its simplicity and compatibility with many programming languages.
"name": “Gyanendra singh",
"age": 26,
"isStudent": false,
"courses": ["Math", "Science", "English"],
"address": {
"street": “Bajrang chauaraha",
"city": “Prayag",
"zipCode": 211001
}
}
These codes shows that further action needs to be
These codes shows that the request was taken by the client to complete the request.
received and understood, and that the
client should continue the request or
ignore it if it’s already finished.
These codes shows that there was an error in the
request from the client.
These codes shows that the request
was successfully received,
understood, and accepted. These codes shows that the server failed to fulfill a
valid request.
200 OK : The request was successful, and the server returned the
requested resource.
201 Created: The request was successful, and a new resource was created
as a result.
400 Bad Request: The server cannot process the request due to a client error (e.g.,
malformed request syntax).
401 Unauthorized: Authentication is required, or the provided credentials are not
valid.
403 Forbidden: The server understood the request, but refuses to authorize it.
404 Not Found: The server cannot find the requested resource.
405 Method Not Allowed: The method specified in the request is not allowed for the
resource.
429 - Too Many Request
https://restful-booker.herokuapp.com/booking
https://restful-booker.herokuapp.com/booking/:id
https://fake-store-api.mock.beeceptor.com/api/products
https://fake-store-api.mock.beeceptor.com/api/users