0% found this document useful (0 votes)
3 views4 pages

API Documentation

Uploaded by

shaiknazeer1606
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

API Documentation

Uploaded by

shaiknazeer1606
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

API Documentation

1) Home Page

• API Url: [Link]

• method: get

• response: 200

Plaintext
"hello to home page"

2) Fetch all users

• API Url: [Link]

• method: get

• response: 200

JSON:
[
{
"id": 1,
"name": "Munish",
"branch": "CSE"
},
{
"id": 2,
"name": "Jagadeesh",
"branch": "ECE"
},
{
"id": 3,
"name": "Nazeer",
"branch": "cse"
},
{
"id": 4,
"name": "Haswanth",
"branch": "IT"
}
]

3) Fetch user by Id

• API Url: [Link]

• Ex: [Link]

• method: GET

• response: 200 (Success) / 404 (Not Found)

Success Response (200):

JSON
{
"id": 1,
"name": "Munish",
"branch": "CSE"
}
Error Response (404):
Plaintext
"user not found"

4) Add a user

•API Url: [Link]

• method: post

• response: 201

Request Body (JSON):


JSON
{
"id": 5,
"name": "ARUN",
"branch": "EEE"
}
Response Body (Plaintext):
"user added successfully"

5) Update a user

• API Url: [Link]

• Ex: [Link]

• method: PUT

• response: 201 (Success) / 404 (Not Found)


Request Body (JSON):

JSON
{
"id": 1,
"name": "Akash",
"branch": "CSE"
}
Success Response (201):
Plaintext
"user updated successfully"
Error Response (404):
Plaintext
"user not found"

6) Delete a user by Id

• API Url: [Link]

Ex: [Link]

• method: delete

• response: 200 (Success) / 404 (Not Found)

Success Response (200):

Plaintext
"User deleted successfully"
Error Response (404):
Plaintext
"User Not Found"

You might also like