{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ff5c1eac-0ec6-4e29-b25b-0712652df273","name":"Ureeka_Project","description":"### Library Management API Documentation\n\nWelcome to the Library Management API documentation. This API provides endpoints to manage users and books within a library system. Below are the endpoints available in this collection:\n\n#### 1\\. **Login**\n\n- **Description:** Authenticate a user to obtain an access token.\n    \n- **Endpoint:** `POST /api/login`\n    \n- **Usage:** Use this request to log in with your registered credentials. On successful authentication, you'll receive an access token to access protected endpoints.\n    \n\n#### 2\\. **Register**\n\n- **Description:** Register a new user.\n    \n- **Endpoint:** `POST /api/register`\n    \n- **Usage:** Register a new user with a unique email address. Provide name, email, password, and password confirmation in the request body to create a new user account.\n    \n\n#### 3\\. **Get User**\n\n- **Description:** Retrieve user details.\n    \n- **Endpoint:** `GET /api/user`\n    \n- **Usage:** Fetch details of the currently authenticated user. Include the access token obtained from the login request in the Authorization header as a Bearer token.\n    \n\n#### 4\\. **View Books**\n\n- **Description:** Retrieve all books.\n    \n- **Endpoint:** `GET /api/books`\n    \n- **Usage:** Retrieve a list of all books available in the library. Requires authentication; include the access token in the Authorization header.\n    \n\n#### 5\\. **Add Books**\n\n- **Description:** Add a new book (Admin only).\n    \n- **Endpoint:** `POST /api/books`\n    \n- **Usage:** Add a new book to the library collection. Only accessible to users with admin privileges. Provide book details including title, ISBN, author, and year of publication in the request body.\n    \n\n#### 6\\. **Update Books**\n\n- **Description:** Update an existing book (Admin only).\n    \n- **Endpoint:** `PUT /api/books/{id}`\n    \n- **Usage:** Update details of an existing book identified by `{id}`. Only accessible to users with admin privileges. Provide updated book details in the request body.\n    \n\n#### 7\\. **Delete Books**\n\n- **Description:** Delete a book (Admin only).\n    \n- **Endpoint:** `DELETE /api/books/{id}`\n    \n- **Usage:** Delete a book from the library collection identified by `{id}`. Only accessible to users with admin privileges. No request body is required; just provide the book ID in the endpoint URL.\n    \n\n### Getting Started\n\n1. **Authentication:**\n    \n    - Start by logging in with your credentials using the `Login` request. Copy the access token from the response.\n        \n    - Use the obtained token as a Bearer token in the Authorization header for subsequent requests.\n        \n2. **Managing Books:**\n    \n    - Use `View Books` to see all available books.\n        \n    - Add new books using `Add Books`, ensuring to provide all required details.\n        \n    - Update existing books with `Update Books`, specifying the book ID and updated information.\n        \n    - Delete unwanted books using `Delete Books`, supplying the book ID to remove from the collection.\n        \n3. **User Management:**\n    \n    - Retrieve user details with `Get User` to view your own profile information.\n        \n\n### Notes:\n\n- Ensure proper authentication for requests requiring admin privileges (`Add Books`, `Update Books`, `Delete Books`).\n    \n- Validate request bodies to meet API requirements, such as unique email addresses for user registration and complete book details for `Add Books` and `Update Books`.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"35383957","team":9171103,"collectionId":"ff5c1eac-0ec6-4e29-b25b-0712652df273","publishedId":"2sA3XQh2MW","public":true,"publicUrl":"https://documenter-api.postman.tech/view/35383957/2sA3XQh2MW","privateUrl":"https://go.postman.co/documentation/35383957-ff5c1eac-0ec6-4e29-b25b-0712652df273","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Login, Register, Get Users, View Books, Add Books, Update Books, and Delete Books."},{"name":"title","value":"Library Management API Documentation"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.11.6","publishDate":"2024-06-15T03:09:44.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Library Management API Documentation","description":"Login, Register, Get Users, View Books, Add Books, Update Books, and Delete Books."},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[{"name":"Library_Development","id":"5389ee82-6a1b-4b5e-b5e3-85c2a82adb46","owner":"35383957","values":[{"key":"baseURL","value":"http://localhost:8000/api","enabled":true,"type":"default"},{"key":"token","value":"","enabled":true,"type":"secret"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/4dbeedb45c838b08fb9beccab1d04c67004b995524f505d575d1607b802be826","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"Library_Development","value":"35383957-5389ee82-6a1b-4b5e-b5e3-85c2a82adb46"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sA3XQh2MW"}