APIs:
POST: localhost:8081/api/login
Request Body: {
"emailAddress":"[email protected]",
"password":"123456798"
}
Response Body:
{
"userId": 2,
"publisherFlag": false,
"emailAddress": "[email protected]"
}
GET: localhost:8081/api/users/1/orders
Response Body:
{
"userId": 1,
"publisherFlag": false,
"emailAddress": "[email protected]",
"firstName": "Neha",
"lastName": "Kothari",
"orders": [
{
"orderId": 2,
"orderStatus": "Processed",
"customEBookName": "Sample stuff",
"totalPrice": 3485.0,
"orderItems": null
},
{
"orderId": 3,
"orderStatus": "Processed",
"customEBookName": "Sample stuff 3",
"totalPrice": 180.0,
"orderItems": null
},
{
"orderId": 5,
"orderStatus": "In Cart",
"customEBookName": null,
"totalPrice": 70.0,
"orderItems": null
}
]
}
GET: localhost:8081/api/users/4/uploadedBooks
Response Body:
{
"userId": 4,
"publisherFlag": true,
"emailAddress": "[email protected]",
"companyName": "Onki Pa",
"uploadedBooks": [
{
"bookId": 6,
"bookName": "Neha Samples Please please work",
"isbnNumber": "852014",
"author": "Onki Na na an",
"publisher": "Pal",
"yearOfRelease": 2017,
"price": 5236.0,
"imageLocation": null,
"description": "BFFS",
"pdfFileLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/2.pdf",
"noOfChapters": null,
"bookChapters": null
},
{
"bookId": 7,
"bookName": "Neha Samples Please please work",
"isbnNumber": "753951",
"author": "Neha bla vla vla",
"publisher": "Ke",
"yearOfRelease": 2000,
"price": 1023.0,
"imageLocation": null,
"description": "Blood of my Enemies",
"pdfFileLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/1.pdf",
"noOfChapters": null,
"bookChapters": null
}
]
}
POST: localhost:8081/api/users/4/uploadBook
Request Body:
{
"bookName":"Neha Samples Please please work",
"isbnNumber":"753951",
"author":"Neha bla vla vla",
"publisher":"Ke",
"yearOfRelease":"2000",
"price":"1023",
"description":"Blood of my Enemies",
"pdfFileLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/1.pdf"
}
Response Body:
{
"bookId": 7,
"bookName": "Neha Samples Please please work",
"isbnNumber": "753951",
"author": "Neha bla vla vla",
"publisher": "Ke",
"yearOfRelease": 2000,
"price": 1023.0,
"imageLocation": null,
"description": "Blood of my Enemies",
"pdfFileLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/1.pdf",
"noOfChapters": null,
"bookChapters": null
}
GET: localhost:8081/api/users/2/cart
Response Body:
{
"orderId": 7,
"userId": 2,
"customEBookName": null,
"totalPrice": 8735,
"orderItems": [
{
"bookId": 2,
"bookName": "DevOps For Dummies",
"bookLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/2.pdf",
"chapterNumber": 1,
"chapterName": "DevOps",
"price": 85.0,
"startPage": 10,
"endPage": 20,
"chapterDescription": "DevOps Introduction!"
},
{
"bookId": 2,
"bookName": "DevOps For Dummies",
"bookLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/2.pdf",
"chapterNumber": 3,
"chapterName": "History",
"price": 8650.0,
"startPage": 35,
"endPage": 50,
"chapterDescription": "Why DevOps was Introdcued?"
}
]
}
POST: localhost:8081/api/books
{
"bookName":"Ayushi",
"isbnNumber":"ryikn7456981230",
"author":"Neha Kothari",
"publisher":"Onkita",
"yearOfRelease":"2018",
"price":"500",
"description":"BFFS"
}
GET: localhost:8081/api/books/isbn/712
{
"bookId": 1,
"bookName": "Ayushi",
"isbnNumber": "ryikn7456981230",
"author": "Neha Kothari",
"publisher": null,
"yearOfRelease": 2018,
"price": 500.0,
"imageLocation": null,
"description": null,
"pdfFileLocation": null,
"bookChapters": null
}
POST: localhost:8081/api/books/split
{
"bookId": "1",
"bookChapters": [
{
"chapterNumber": "1",
"chapterName": "Hello",
"price": "85",
"startPage": "10",
"endPage": "20",
"description": "Tata World!"
},
{
"chapterNumber": "5",
"chapterName": "Tata",
"price": "8650",
"startPage": "35",
"endPage": "50",
"description": "BABABABABABABABABABA"
}
]
}
GET: localhost:8081/api/books/1
{
"bookId": 1,
"bookName": "Ayushi",
"isbnNumber": "ryikn7456981230",
"author": "Neha Kothari",
"publisher": null,
"yearOfRelease": 2018,
"price": 500.0,
"imageLocation": null,
"description": null,
"pdfFileLocation": null,
"bookChapters": [
{
"chapterNumber": 1,
"chapterName": "Hello",
"price": 85.0,
"startPage": 10,
"endPage": 20,
"description": "Tata World!"
},
{
"chapterNumber": 5,
"chapterName": "Tata",
"price": 8650.0,
"startPage": 35,
"endPage": 50,
"description": "BABABABABABABABABABA"
}
]
}
POST: localhost:8081/api/cart/add
{
"userId":"2",
"itemDetails": {
"bookId":"2",
"chapterNumber":"3",
"price":"50"
}
}
{
"orderId": 7,
"userId": 2,
"totalNumberOfItems": 2
}
GET: localhost:8081/api/cart/orders/7
{
"orderId": 7,
"userId": 2,
"customEBookName": null,
"orderItems": [
{
"bookId": 2,
"bookName": "DevOps For Dummies",
"bookLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/2.pdf",
"chapterNumber": 1,
"price": 85.0,
"startPage": 10,
"endPage": 20,
"chapterDescription": "DevOps Introduction!"
},
{
"bookId": 2,
"bookName": "DevOps For Dummies",
"bookLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/2.pdf",
"chapterNumber": 3,
"price": 8650.0,
"startPage": 35,
"endPage": 50,
"chapterDescription": "Why DevOps was Introdcued?"
}
]
}
POST: localhost:8081/api/cart/checkout
"orderId":"6",
"userId":"1",
"customEBookName":"Sample stuff 3",
"orderItems": [
{
"bookId":"2",
"chapterNumber": 2,
"price": 8650.0,
"startPage": 35,
"endPage": 50,
"bookLocation":"/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/1.pdf"
},
{
"bookId":"1",
"chapterNumber": 1,
"chapterName": "Introduction",
"price": 85.0,
"startPage": 10,
"endPage": 20,
"bookLocation":"/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/1.pdf"
}
]
}
{
"orderId": 6,
"mergedPdfLocation": "/home/nehakothari/Desktop/Semester2/CS-605DataModeling/Project/Books/Order-6.pdf",
"totalPrice": 50.0
}