{"info":{"_postman_id":"555274df-767c-4e64-922d-0cb0458700cd","name":"Book management app","description":"<html><head></head><body><h1 id=\"book-management-system-api-documentation\">Book Management System API Documentation</h1>\n<p>This API provides a RESTful interface for managing users and books in a secure and efficient way, focusing on authentication, profile management, and book operations. The API uses <strong>cookie-based authentication</strong> to securely handle user sessions.</p>\n<hr>\n<h2 id=\"key-features\">Key Features</h2>\n<h3 id=\"1-user-management\">1. <strong>User Management</strong></h3>\n<ul>\n<li><p><strong>Registration</strong>: Users can sign up with a unique username, email, and password. Passwords are securely hashed.</p>\n<ul>\n<li><strong>User Login</strong>: Authenticates users and returns an HTTP-only cookie to manage user sessions.</li>\n</ul>\n</li>\n<li><p><strong>Protected Endpoints</strong>: All book management and profile routes are secured with JWT-based authentication.</p>\n</li>\n</ul>\n<h3 id=\"2-profile-management\">2. <strong>Profile Management</strong></h3>\n<ul>\n<li><p><strong>View Profile</strong>: Users can retrieve their profile information.</p>\n</li>\n<li><p><strong>Update Profile</strong>: Users can update their profile details, with checks to ensure email uniqueness.</p>\n</li>\n<li><p><strong>Delete Profile</strong>: Users can delete their account, handling associated book data appropriately.</p>\n</li>\n</ul>\n<h3 id=\"3-book-management\">3. <strong>Book Management</strong></h3>\n<ul>\n<li><p><strong>Add a Book</strong>: Users can add books with details such as title, author, genre, published date, and optional fields like description and rating.</p>\n</li>\n<li><p><strong>View All Books</strong>: Users can retrieve their book collection, with options to filter by genre, author, or rating.</p>\n</li>\n<li><p><strong>View a Single Book</strong>: Users can view detailed information on a specific book by ID.</p>\n</li>\n<li><p><strong>Update Book</strong>: Users can edit the book’s information. Only the book owner can perform updates.</p>\n</li>\n<li><p><strong>Delete Book</strong>: Users can remove a book from their collection. Only the book owner can perform deletions.</p>\n</li>\n</ul>\n<h3 id=\"4-welcome-email-notification\">4. <strong>Welcome Email Notification</strong></h3>\n<ul>\n<li>A welcome email is sent upon successful user registration using EJS templating for a personalized experience</li>\n</ul>\n<h3 id=\"5-additional-features\">5. <strong>Additional Features</strong></h3>\n<ul>\n<li><p><strong>Cookie-Based Authentication</strong>: Sessions are managed via HTTP-only cookies.</p>\n</li>\n<li><p><strong>Postman Documentation</strong>: API endpoints are documented with example requests, responses, and authorization setup.</p>\n</li>\n<li><p><strong>Welcome Email</strong>: Sends a welcome email using EJS templating upon user registration.</p>\n</li>\n<li><p><strong>Environment Variables</strong>: Secure handling of sensitive information using environment variables.</p>\n</li>\n</ul>\n<h3 id=\"6-optional-features\">6. <strong>Optional Features</strong></h3>\n<ul>\n<li><p><strong>Entity Relationship Diagram (ERD)</strong>: Visual representation of database relationships.</p>\n</li>\n<li><p><strong>Pagination</strong>: Supports pagination for efficient data handling.</p>\n</li>\n<li><p><strong>Search</strong>: Users can search their book collection by title or author.</p>\n</li>\n</ul>\n<hr>\n<h2 id=\"authentication\">Authentication</h2>\n<p>Cookie-Based Authentication: Sessions are managed via HTTP-only cookies<br>This API uses JWT for protecting routes. Users must log in and receive a token to access profile and book management endpoints. The token is saved in an httpOnly cookie</p>\n<h2 id=\"setup\">Setup</h2>\n<h3 id=\"prerequisites\">Prerequisites</h3>\n<ul>\n<li><p>Node.js and npm</p>\n</li>\n<li><p>MongoDB (or other preferred database)</p>\n</li>\n<li><p>A mail service with SMTP access</p>\n</li>\n</ul>\n<h3 id=\"installation\">Installation</h3>\n<ol>\n<li><p>git clone<br> <a href=\"https://StartFragmenthttps://github.com/Retpaul/book_app_backend.git\">https://github.com/Retpaul/book_app_backend.git<br></a>book-management-system</p>\n</li>\n<li><p>Install dependencies:<br> npm install</p>\n</li>\n<li><p>PORT=3000 JWT_SECRET=your_jwt_secret DB_URI=your_database_uri EMAIL_HOST=smtp.mailtrap.io EMAIL_PORT= EMAIL_USER=your_smtp_username EMAIL_PASS=your_smtp_password</p>\n</li>\n<li><p>Run the application:<br> npm run dev</p>\n</li>\n</ol>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Book Management System API Documentation","slug":"book-management-system-api-documentation"}],"owner":"29921932","collectionId":"555274df-767c-4e64-922d-0cb0458700cd","publishedId":"2sAY4sjQ1h","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-26T12:24:08.000Z"},"item":[{"name":"authentication","item":[{"name":"Register user","id":"bd4ff45f-01e8-453a-b1a4-da59c53108ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"username\":\"Retyit\",\"email\":\"ret@mail\",\"password\":\"123456\"}","options":{"raw":{"language":"text"}}},"url":"http://localhost:5000/api/auth/register","urlObject":{"protocol":"http","port":"5000","path":["api","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"bf50b3f4-a600-4a98-ad76-8b6b92262cbb","name":"Register user example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"RPaul\",\r\n    \"email\": \"retyitpaul23@gmail.com\",\r\n    \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/register"},"status":"Created","code":201,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"107","type":"text"},{"key":"ETag","value":"W/\"6b-26qMkwKlpp5/ZDSMaEWeGAmlvV0\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:12:43 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User account succesfully created\",\n    \"data\": {\n        \"username\": \"RPaul\",\n        \"email\": \"retyitpaul23@gmail.com\"\n    }\n}"}],"_postman_id":"bd4ff45f-01e8-453a-b1a4-da59c53108ae"},{"name":"user login","id":"4ee1abff-9d4d-4d73-ae43-aef69079b9c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"retyitpaul23@gmail\",\r\n    \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login","urlObject":{"protocol":"http","port":"5000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"87801982-3cf0-4433-93f4-e0a16a9e63f9","name":"user login example","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"retyitpaul23@gmail.com\",\r\n    \"password\": \"123456\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Set-Cookie","value":"jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NzFjMTdkYjY5NWRjNmY3OTVkMDM3ZjkiLCJpYXQiOjE3Mjk4OTQ2MjMsImV4cCI6MTczMDc1ODYyM30.bKpjc0lplPMxFfxscboNcet6Zi4Xr5KpzvGjIYkucT4; Max-Age=864000; Path=/; Expires=Mon, 04 Nov 2024 22:17:03 GMT; HttpOnly; SameSite=Strict","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"36","type":"text"},{"key":"ETag","value":"W/\"24-3gx7rXb5pB0Vhk2yIzwfKbNy2Q4\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:17:04 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Successfully Logged in\"\n}"}],"_postman_id":"4ee1abff-9d4d-4d73-ae43-aef69079b9c7"}],"id":"27f77f26-ecbf-4562-ac3a-fe19b67c2bf0","_postman_id":"27f77f26-ecbf-4562-ac3a-fe19b67c2bf0","description":""},{"name":"profile management","item":[{"name":"update user","id":"4caf9597-021f-48c9-bb50-584933cef298","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/profile/671c17db695dc6f795d037f9","urlObject":{"protocol":"http","port":"5000","path":["api","profile","671c17db695dc6f795d037f9"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7083f532-3d58-425b-a735-b926594556e9","name":"error handling","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"RetPaul\",\r\n    \"email\": \"retyitpaul23@gmail.com\",\r\n    \"password\": \"1234567\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/profile/671c17db695dc6f795d037f9"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"112","type":"text"},{"key":"ETag","value":"W/\"70-JVwUPjM/c/997cHwQJV/0bMQdtI\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:24:57 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"Not Found - /api/profile/671c17db695dc6f795d037f9\",\n    \"error_code\": 500,\n    \"details\": null\n}"},{"id":"4d5b1cf6-1071-4566-b7f8-ae124cc4c330","name":"user updated","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"RetPaul\",\r\n    \"password\": \"1234567\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/profile"},"status":"Created","code":201,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"110","type":"text"},{"key":"ETag","value":"W/\"6e-L/VTS/clHlvFpNtSzF4BwVjj34I\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:29:36 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"User profile updated successfully\",\n    \"data\": {\n        \"username\": \"RetPaul\",\n        \"email\": \"retyitpaul23@gmail.com\"\n    }\n}"}],"_postman_id":"4caf9597-021f-48c9-bb50-584933cef298"},{"name":"user profile","id":"c6e8bf39-9d20-4118-ac5b-84c40cf7c6ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"","urlObject":{"query":[],"variable":[]}},"response":[{"id":"e474fc0e-f4b7-43f9-ae01-523277385efb","name":"user not authorized","originalRequest":{"method":"GET","header":[],"url":"http://localhost:5000/api/profile"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"77","type":"text"},{"key":"ETag","value":"W/\"4d-Nd2nHaLxdKZTeEYt/ylv5/9EodM\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:16:28 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"Not authorized\",\n    \"error_code\": 500,\n    \"details\": null\n}"},{"id":"b8bc167c-cb2d-4ae3-b978-1d8e64639e08","name":"user authorized","originalRequest":{"method":"GET","header":[],"url":"http://localhost:5000/api/profile"},"status":"OK","code":200,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"197","type":"text"},{"key":"ETag","value":"W/\"c5-asX9NhZ/icGffgZceCjfGPWU5w8\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:19:34 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"671c17db695dc6f795d037f9\",\n    \"username\": \"RPaul\",\n    \"email\": \"retyitpaul23@gmail.com\",\n    \"role\": \"user\",\n    \"books\": [],\n    \"createdAt\": \"2024-10-25T22:12:43.412Z\",\n    \"updatedAt\": \"2024-10-25T22:12:43.412Z\",\n    \"__v\": 0\n}"}],"_postman_id":"c6e8bf39-9d20-4118-ac5b-84c40cf7c6ce"},{"name":"delete user","id":"4a61513d-a93b-4042-9805-d970fca36144","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:5000/api/profile","urlObject":{"protocol":"http","port":"5000","path":["api","profile"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"94b3c54b-271f-4bdf-948e-9022ade94afd","name":"user deleted","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:5000/api/profile"},"status":"No Content","code":204,"_postman_previewlanguage":"Text","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Set-Cookie","value":"jwt=; Path=/; Expires=Thu, 01 Jan 1970 00:00:00 GMT; HttpOnly","type":"text"},{"key":"ETag","value":"W/\"2f-GOLH1MiXxWEzpKsaICrOJSijabE\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:31:49 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":""}],"_postman_id":"4a61513d-a93b-4042-9805-d970fca36144"}],"id":"3ab98c82-4809-472d-b0cc-8b5d815e26e3","_postman_id":"3ab98c82-4809-472d-b0cc-8b5d815e26e3","description":""},{"name":"book management","item":[{"name":"add book","id":"1279f4b4-5230-480e-8eba-a47380ab5c81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"","urlObject":{"query":[],"variable":[]}},"response":[{"id":"2fa63435-08cf-42ba-9441-5df61ebb9025","name":"not authorized","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"book1\",\r\n    \"author\": \"author1\",\r\n    \"genre\": \"genre1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/books"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"77","type":"text"},{"key":"ETag","value":"W/\"4d-Nd2nHaLxdKZTeEYt/ylv5/9EodM\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:38:16 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"Not authorized\",\n    \"error_code\": 500,\n    \"details\": null\n}"},{"id":"d9c4e307-5ee6-4e0c-8d1c-432a0f34262a","name":"add book","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"book1\",\r\n    \"author\": \"author1\",\r\n    \"genre\": \"genre1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/books"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"77","type":"text"},{"key":"ETag","value":"W/\"4d-Nd2nHaLxdKZTeEYt/ylv5/9EodM\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:38:16 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"Not authorized\",\n    \"error_code\": 500,\n    \"details\": null\n}"},{"id":"a798664c-e7fc-4329-a079-296a6674539a","name":"incomplete information","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"book1\",\r\n    \"author\": \"author1\",\r\n    \"genre\": \"genre1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/books"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"93","type":"text"},{"key":"ETag","value":"W/\"5d-11QDnsCRKTlkVGxZGpa0b6r3pLY\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:43:09 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"error\",\n    \"message\": \"Enter all required information\",\n    \"error_code\": 500,\n    \"details\": null\n}"},{"id":"caaa3781-446d-4ff7-ac8e-181c3b5ddf7a","name":"add book","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"book1\",\r\n    \"author\": \"author1\",\r\n    \"publishedDate\": \"25-10-2024\",\r\n    \"genre\": \"genre1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/books"},"status":"Created","code":201,"_postman_previewlanguage":"JSON","header":[{"key":"X-Powered-By","value":"Express","type":"text"},{"key":"Access-Control-Allow-Origin","value":"*","type":"text"},{"key":"Content-Type","value":"application/json; charset=utf-8","type":"text"},{"key":"Content-Length","value":"236","type":"text"},{"key":"ETag","value":"W/\"ec-psJL/in8nNSmS/R/TWuNAL+OU3Y\"","type":"text"},{"key":"Date","value":"Fri, 25 Oct 2024 22:46:01 GMT","type":"text"},{"key":"Connection","value":"keep-alive","type":"text"},{"key":"Keep-Alive","value":"timeout=5","type":"text"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"book1\",\n    \"author\": \"author1\",\n    \"genre\": \"genre1\",\n    \"publishedDate\": \"25-10-2024\",\n    \"owner\": \"671c1334c10e1acc2c4d864a\",\n    \"_id\": \"671c1fa92c8695c78a12977e\",\n    \"createdAt\": \"2024-10-25T22:46:01.696Z\",\n    \"updatedAt\": \"2024-10-25T22:46:01.696Z\",\n    \"__v\": 0\n}"}],"_postman_id":"1279f4b4-5230-480e-8eba-a47380ab5c81"},{"name":"get single book","id":"a586d7b5-b431-4b10-91c1-9e58ea2effea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"d2fbed18-2c7f-4b59-ae5e-a7ee03c3dccb","name":"singlebook","originalRequest":{"method":"GET","header":[],"url":"{{url}}/books/671c1fa92c8695c78a12977e"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"236"},{"key":"ETag","value":"W/\"ec-Szj8DpjRvXrRGdHO+B6rVE9mCRI\""},{"key":"Date","value":"Sat, 26 Oct 2024 12:04:17 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"671c1fa92c8695c78a12977e\",\n    \"title\": \"book1\",\n    \"author\": \"author1\",\n    \"genre\": \"genre1\",\n    \"publishedDate\": \"25-10-2024\",\n    \"owner\": \"671c1334c10e1acc2c4d864a\",\n    \"createdAt\": \"2024-10-25T22:46:01.696Z\",\n    \"updatedAt\": \"2024-10-25T22:46:01.696Z\",\n    \"__v\": 0\n}"}],"_postman_id":"a586d7b5-b431-4b10-91c1-9e58ea2effea"},{"name":"delete book","id":"a8d9e905-2e13-4f55-8754-59f64eff164c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"5efb0cd9-4ebc-4c3a-9b07-9a58f408356c","name":"deletedbook","originalRequest":{"method":"DELETE","header":[],"url":"{{url}}/books/671c1fa92c8695c78a12977e"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"39"},{"key":"ETag","value":"W/\"27-1h2EDlRK8KqUKkNxLrVfpDY7He4\""},{"key":"Date","value":"Sat, 26 Oct 2024 12:07:51 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Successfully deleted book\"\n}"}],"_postman_id":"a8d9e905-2e13-4f55-8754-59f64eff164c"},{"name":"getbooks","id":"b4fb348e-bbaa-4ed1-98b7-3656751778a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"c962580c-96b0-479f-9ed5-64c1517f829b","name":"nobooks","originalRequest":{"method":"GET","header":[],"url":"{{url}}/books"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"ETag","value":"W/\"2-l9Fw4VUO7kr8CvBlt4zaMCqXZ0w\""},{"key":"Date","value":"Sat, 26 Oct 2024 12:02:28 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":null},{"id":"b4bdc84e-e1c6-4be9-9816-cfd298ff985a","name":"all books","originalRequest":{"method":"GET","header":[],"url":"{{url}}/books"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"238"},{"key":"ETag","value":"W/\"ee-UZLXbz3GRwO1SD65S3dqkXJUrFU\""},{"key":"Date","value":"Sat, 26 Oct 2024 12:05:50 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"_id\": \"671cda76b7226aa3f5c27bb1\",\n        \"title\": \"book1\",\n        \"author\": \"author1\",\n        \"genre\": \"genre1\",\n        \"publishedDate\": \"25-10-2024\",\n        \"owner\": \"671cd9eeb7226aa3f5c27baa\",\n        \"createdAt\": \"2024-10-26T12:03:02.365Z\",\n        \"updatedAt\": \"2024-10-26T12:03:02.365Z\",\n        \"__v\": 0\n    }\n]"}],"_postman_id":"b4fb348e-bbaa-4ed1-98b7-3656751778a0"},{"name":"updateBook","id":"abe2082e-9f34-484b-bdd5-fff2750ebe02","request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"book1\",\r\n    \"author\": \"author\",\r\n    \"publishedDate\": \"25-01-2024\",\r\n    \"description\": \"this is my first \"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/books/671c1fa92c8695c78a12977e","urlObject":{"path":["books","671c1fa92c8695c78a12977e"],"host":["{{url}}"],"query":[],"variable":[]}},"response":[{"id":"24c9bef8-73a3-406f-bfa1-182166680a38","name":"updatedbook","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"book1\",\r\n    \"author\": \"author\",\r\n    \"publishedDate\": \"25-01-2024\",\r\n    \"description\": \"this is my first \"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{url}}/books/671c1fa92c8695c78a12977e"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"*"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"269"},{"key":"ETag","value":"W/\"10d-k+XnPg8NIpZVZUnAA6UC1lWHVog\""},{"key":"Date","value":"Sat, 26 Oct 2024 12:07:04 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"_id\": \"671c1fa92c8695c78a12977e\",\n    \"title\": \"book1\",\n    \"author\": \"author\",\n    \"genre\": \"genre1\",\n    \"publishedDate\": \"25-01-2024\",\n    \"owner\": \"671c1334c10e1acc2c4d864a\",\n    \"createdAt\": \"2024-10-25T22:46:01.696Z\",\n    \"updatedAt\": \"2024-10-26T12:07:04.026Z\",\n    \"__v\": 0,\n    \"description\": \"this is my first \"\n}"}],"_postman_id":"abe2082e-9f34-484b-bdd5-fff2750ebe02"}],"id":"261ca1bb-8ba9-48a8-a79c-6ed3071cdce6","_postman_id":"261ca1bb-8ba9-48a8-a79c-6ed3071cdce6","description":""}]}