{"info":{"_postman_id":"7ed21c8e-771c-4b32-af0d-98327dce3aec","name":"Library API Development","description":"<html><head></head><body><h1 id=\"get-started-here\">🚀 Get started here</h1>\n<p>This project is a simple Spring Boot application that provides a RESTful API for managing books. It allows users to perform CRUD (Create, Read, Update, Delete) operations on books using the API. It adding new books, updating existing ones, searching for books, and deleting books.</p>\n<h2 id=\"💡links\">💡Links</h2>\n<p><a href=\"https://github.com/ajaynegi45/Library-API\">Library API Project Github</a><br><a href=\"https://github.com/ajaynegi45/Library-API\">Project Documentation</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"🚀 Get started here","slug":"get-started-here"}],"owner":"28691426","collectionId":"7ed21c8e-771c-4b32-af0d-98327dce3aec","publishedId":"2s9XxwxEsr","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-08-03T18:11:07.000Z"},"item":[{"name":"Add Book","event":[{"listen":"test","script":{"id":"7e00d5a1-ebd6-4eef-9208-bf0a50f93621","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"7274cde0-7d3b-422a-b0b7-d4895575365d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"bookName\": \"To Kill a Mockingbird\",\n    \"authorName\": \"Harper Lee\",\n    \"bookPrice\": 200.99,\n    \"stockQuantity\": 30\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/addBook","description":"<p>Add a new book to the database. This is a POST request, submitting data to an API via the request body. This request submits JSON data.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li><code>201 Created</code>: Book added successfully</li>\n<li><code>409 CONFLICT</code>: if there is a conflict (e.g., book not able to store ).</li>\n<li><code>500 INTERNAL_SERVER_ERROR</code>: if there is an internal server error.</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["addBook"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7274cde0-7d3b-422a-b0b7-d4895575365d"},{"name":"Update Book Details","event":[{"listen":"test","script":{"id":"c8c5f31e-8d05-4016-86c4-8c065fa9fdb4","exec":["pm.test(\"Successful PUT request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201, 204]);","});",""],"type":"text/javascript"}}],"id":"29e41096-2997-4b44-a600-a1fef913138d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"bookName\": \"Updated Book Name\",\n    \"authorName\": \"Updated Author Name\",\n    \"bookPrice\": \"Updated Book Price\",\n    \"stockQuantity\": \"Updated Stock Quantity\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/updatebook/12","description":"<p>Update an existing book's details by providing the book ID.</p>\n<ul>\n<li><strong>Response code::</strong><ul>\n<li><code>202 Accepted</code>: Book updated successfully</li>\n<li><code>404 Not Found</code>: Book with the given ID not found</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["updatebook","12"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"29e41096-2997-4b44-a600-a1fef913138d"},{"name":"Get All Books","event":[{"listen":"test","script":{"id":"4dd3489e-614c-427c-8fc2-6969b34ee4d2","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"6d390d03-51e2-4615-bb25-e5d98a6a7aaf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/getAllBooks","description":"<p>Get all Books which are present in database.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li>List of BookEntity objects</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["getAllBooks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6d390d03-51e2-4615-bb25-e5d98a6a7aaf"},{"name":"Get Single Book by Id","event":[{"listen":"test","script":{"id":"4dd3489e-614c-427c-8fc2-6969b34ee4d2","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"1234c915-fdc9-4c6f-acb1-9e64bb1a2a84","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/getBookById/1","description":"<p>Get all Books which are present in database.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li>BookEntity objects</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["getBookById","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1234c915-fdc9-4c6f-acb1-9e64bb1a2a84"},{"name":"Get Books by Name Containing","event":[{"listen":"test","script":{"id":"4dd3489e-614c-427c-8fc2-6969b34ee4d2","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"5fcfd41e-c848-4446-b471-54491f7df143","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/bookNameContain/The","description":"<p>Get all the Books which Name Containing a request Parameter word or character.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li>List of BookEntity objects</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["bookNameContain","The"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5fcfd41e-c848-4446-b471-54491f7df143"},{"name":"Get Books by Name Starting With","event":[{"listen":"test","script":{"id":"4dd3489e-614c-427c-8fc2-6969b34ee4d2","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript","packages":{}}}],"id":"d17f9772-234d-4690-9fbb-731b5d6f73ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/bookNameStartWith/the","description":"<p>Get all the Books which Name Starting With request parameter word or character</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li>List of BookEntity objects</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["bookNameStartWith","the"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d17f9772-234d-4690-9fbb-731b5d6f73ea"},{"name":"Get Books by Name Ending With","event":[{"listen":"test","script":{"id":"4dd3489e-614c-427c-8fc2-6969b34ee4d2","exec":["pm.test(\"Status code is 200\", function () {","    pm.response.to.have.status(200);","});"],"type":"text/javascript"}}],"id":"ced64712-d608-42fd-a370-7dc070a56d54","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/bookNameEndWith/I","description":"<p>Get all the Books which Name Ending With request parameter word or character</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li>List of BookEntity objects</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["bookNameEndWith","I"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"ced64712-d608-42fd-a370-7dc070a56d54"},{"name":"Delete data","event":[{"listen":"test","script":{"id":"d4e753f2-3f3f-40dc-997b-ab74018a639e","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([202, 204]);","});",""],"type":"text/javascript"}}],"id":"cd9832ab-0788-4c1e-9630-daabf659fcc2","protocolProfileBehavior":{"disabledSystemHeaders":{}},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/deleteBookById/15","description":"<p><strong>Delete Book by ID</strong></p>\n<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li><code>202 Accepted</code> : Book deleted successfully</li>\n<li><code>404 Not Found</code>: Book with the given ID not found</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["deleteBookById","15"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cd9832ab-0788-4c1e-9630-daabf659fcc2"},{"name":"Delete Book by Name","event":[{"listen":"test","script":{"id":"d4e753f2-3f3f-40dc-997b-ab74018a639e","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([202, 204]);","});",""],"type":"text/javascript"}}],"id":"93e6456f-1ce5-414f-9fe7-ddc4494e5802","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/deleteBookByName/RestAPI","description":"<p><strong>Delete Book by Name</strong></p>\n<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li><code>202 Accepted</code> : Book deleted successfully</li>\n<li><code>404 Not Found</code>: No books found with the given name</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["deleteBookByName","RestAPI"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"93e6456f-1ce5-414f-9fe7-ddc4494e5802"},{"name":"Delete Books by Author","event":[{"listen":"test","script":{"id":"d4e753f2-3f3f-40dc-997b-ab74018a639e","exec":["pm.test(\"Successful DELETE request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([202, 204]);","});",""],"type":"text/javascript"}}],"id":"01c9f2b2-6c52-4fb7-aff9-487695ce5837","protocolProfileBehavior":{"disabledSystemHeaders":{},"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/deleteAllByAuthor/AjayNegi","description":"<p><strong>Delete Books by Author Name</strong></p>\n<p>This is a DELETE request, and it is used to delete data that was previously created via a POST request.</p>\n<ul>\n<li><strong>Response code:</strong><ul>\n<li><code>202 Accepted</code> : Book deleted successfully</li>\n<li><code>404 Not Found</code>: No books found with the given author name</li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8080","path":["deleteAllByAuthor","AjayNegi"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"01c9f2b2-6c52-4fb7-aff9-487695ce5837"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""]}},{"listen":"test","script":{"type":"text/javascript","exec":[""]}}],"variable":[{"key":"id","value":"1"},{"key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}