Library-Management-System API API Reference
Library-Management-System API Information
Version: 0.1.0
Authentication
Books
Everything about Books
LIST
List of the Books
page:
int
in query
page of query
name:
string
in query
name of the book
cbNum:
string
in query
name of the book
genr:
string
in query
genre of the book
sort:
string
asc,
desc
in query
genre of the book
lte:
boolean
in query
on giving cupboard number(cbNum) results are (n>cbNum), if lte is passed results are (n<cbNum)
200 OK
A successful response
CREATE
Add a new Book
undefined
Request Example
{
"id": "ObjectId('5f4399be7c4460234c97a71d')",
"name": "War and Peace",
"cupBoardNumber": 7845,
"genre": "Action"
}
201 Created
Successful response
406 Not Acceptable
Empty Body
READ
Read Book
id:
string
in path
(no description)
200 OK
Successful response
404 Not Found
Book Not Found
DELETE
Delete Books
id:
string
in path
(no description)
204 No Content
Successful response
400 Bad Request
Empty Body
UPDATE
Update Books
id:
string
in path
(no description)
202 Accepted
Book Updated
400 Bad Request
Empty Body
default
GET /
Get the available routes.
200 OK
A successful response
Response Content-Types: application/json
Schema Definitions
Book: object
- id: string (ObjectId)
- name: string (string)
- cupBoardNumber: integer (int)
- genre: string (string)
Example
{
"id": "ObjectId('5f4399be7c4460234c97a71d')",
"name": "War and Peace",
"cupBoardNumber": 7845,
"genre": "Action"
}