{"info":{"_postman_id":"b3246397-e958-4c35-882f-36821eff03e3","name":"Gen-Y Backend Task","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>This API allows users to register as an admin or a normal user. The user can then login, and a json web token will be sent as a response. This jwt is then used for further authentication. For example, only an admin can add posts to a database. Whereas both, normal users as well as admins can view existing posts.</p>\n<h1 id=\"overview\">Overview</h1>\n<p>A user can register and hence login. Depending on the authentication status, the user will have access to the posts stored in the database.</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>JSON WEB TOKEN is used in the request header for authentication of the user.</p>\n<h1 id=\"error-codes\">Error Codes</h1>\n<p>500, 400, 401, 403</p>\n<h1 id=\"rate-limit\">Rate limit</h1>\n<p>Is there a limit to the number of requests a user can send?</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error Codes","slug":"error-codes"},{"content":"Rate limit","slug":"rate-limit"}],"owner":"9032280","collectionId":"b3246397-e958-4c35-882f-36821eff03e3","publishedId":"UVC8D6bR","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2021-11-13T10:27:21.000Z"},"item":[{"name":"Register User","id":"052f901f-4107-474b-b37e-35819d9aa4a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Give email, password and admin value in the request body in the form of json for user registration</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"052f901f-4107-474b-b37e-35819d9aa4a8"},{"name":"User Login","id":"c39045b0-2a92-44d9-b276-a40149f63196","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>Give the email and password in the request body in the json format to login.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"c39045b0-2a92-44d9-b276-a40149f63196"},{"name":"Add Post","id":"167e36e2-0dae-4a25-bd12-148a27547e75","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>This will work only for admin users. So in the request header, give the authentication key a value of Bearer_jwt of that particular admin user. And in the request body, add post title and description in json format and send the request.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"167e36e2-0dae-4a25-bd12-148a27547e75"},{"name":"Get Post","id":"19b47e58-b31c-4461-b65a-c56324a2f1aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>This request will work for both, normal users as well as admins. But the user should be logged in. So in the request headers, give the authentication key a value of Bearer_jwt of that particular user and send the request.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"19b47e58-b31c-4461-b65a-c56324a2f1aa"}]}