0% found this document useful (0 votes)
6 views2 pages

json1

The document outlines a collection of API requests related to book management, including methods to get all books, get fiction books, retrieve a book by ID, add a new book, check out a book, and delete a book. It also includes a skill check request. Each request specifies the HTTP method and the corresponding URL format for interaction with the API.

Uploaded by

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

json1

The document outlines a collection of API requests related to book management, including methods to get all books, get fiction books, retrieve a book by ID, add a new book, check out a book, and delete a book. It also includes a skill check request. Each request specifies the HTTP method and the corresponding URL format for interaction with the API.

Uploaded by

vinay234yee
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

{

"info": {
"name": "Book API Requests",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get Books",
"request": {
"method": "GET",
"url": "{{base_url}}/books"
}
},
{
"name": "Get Fiction Books",
"request": {
"method": "GET",
"url": "{{base_url}}/books?category=fiction"
}
},
{
"name": "Get Book by ID",
"request": {
"method": "GET",
"url": "{{base_url}}/books/{{book_id}}"
}
},
{
"name": "Add a Book",
"request": {
"method": "POST",
"url": "{{base_url}}/books",
"header": [{"key": "Content-Type", "value": "application/json"}],
"body": {
"mode": "raw",
"raw": "{\"title\": \"New Book Title\", \"author\": \"Author Name\", \"category\": \"fiction\",
\"publishedYear\": 2024}"
}
}
},
{
"name": "Checkout a Book",
"request": {
"method": "PUT",
"url": "{{base_url}}/books/{{book_id}}/checkout",
"header": [{"key": "Content-Type", "value": "application/json"}]
}
},
{
"name": "Delete a Book",
"request": {
"method": "DELETE",
"url": "{{base_url}}/books/{{book_id}}"
}
},
{
"name": "Skill Check Request",
"request": {
"method": "GET",
"url": "{{base_url}}/skillcheck"
}
}
]
}

You might also like