{"info":{"_postman_id":"b34e1f9a-83fb-45bf-89a1-ba8d840c4404","name":"instagram-clone","description":"<html><head></head><body><h1 id=\"overview\">Overview</h1>\n<p>Very basic APIs for a instagram-clone. It has all the basic CRUD operations to view the frontend application.</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>Returns <code>token</code> on login response but currently, no authorization happening at the backend. Can be used to only detect if a user is logged in or not.</p>\n<h1 id=\"error-responses\">Error responses</h1>\n<p>Will return generic error responses with error and message. Frontend has to assume and handle from the status codes.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Overview","slug":"overview"},{"content":"Authentication","slug":"authentication"},{"content":"Error responses","slug":"error-responses"}],"owner":"10049988","collectionId":"b34e1f9a-83fb-45bf-89a1-ba8d840c4404","publishedId":"T1DpDdbV","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-07-24T21:28:03.000Z"},"item":[{"name":"users","item":[{"name":"http://localhost:9000/users","id":"633c9ae2-8ec7-4d05-b867-292e43d081e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"joker\",\r\n    \"password\": \"batman\",\r\n    \"email\": \"jacknapier@gotham.com\",\r\n    \"name\": \"Joker\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/users","description":"<p>Users API (get, post)</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"633c9ae2-8ec7-4d05-b867-292e43d081e1"},{"name":"http://localhost:9000/users/1","id":"d7552a6d-d0f7-4fb4-a7a3-b48ef8716155","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"batman\",\r\n    \"email\": \"bruce@waynecorp.com\",\r\n    \"name\": \"Batman\",\r\n    \"description\": \"I am Batman!\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/users/1","description":"<p>User API (get, patch, delete)</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7552a6d-d0f7-4fb4-a7a3-b48ef8716155"},{"name":"http://localhost:9000/users/follow","id":"84e85491-3778-41fe-b516-c8b328a0b105","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"followingId\": 2,\r\n    \"userId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/users/follow","description":"<p>Follow another user</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users","follow"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"84e85491-3778-41fe-b516-c8b328a0b105"},{"name":"http://localhost:9000/users/unfollow","id":"5d5ca9a2-5e2e-4335-b637-8ff9bc7b870d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"followingId\": 1,\r\n    \"userId\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/users/unfollow","description":"<p>Unfollow another user</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users","unfollow"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5d5ca9a2-5e2e-4335-b637-8ff9bc7b870d"},{"name":"http://localhost:9000/users/upload-avatar","id":"0640e2d7-d906-4246-8ebf-813873dfba17","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"avatar","type":"file","src":"/C:/Users/Mark/Pictures/insta-clone/bat-avatar.jpg"},{"key":"userId","value":"1","type":"text"}]},"url":"http://localhost:9000/users/upload-avatar","description":"<p>Upload User profile picture (form-data)</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users","upload-avatar"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0640e2d7-d906-4246-8ebf-813873dfba17"},{"name":"http://localhost:9000/users/username/batman","id":"0fb6c43c-1d67-4787-91a8-0ea1500405de","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9000/users/username/batman","description":"<p>Find user by username</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users","username","batman"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0fb6c43c-1d67-4787-91a8-0ea1500405de"},{"name":"http://localhost:9000/users/1/posts","id":"9c2b69bc-3217-417a-a598-be0572ec0579","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:9000/users/1/posts","description":"<p>Get all posts by this user</p>\n","urlObject":{"protocol":"http","port":"9000","path":["users","1","posts"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c2b69bc-3217-417a-a598-be0572ec0579"}],"id":"c5b660d6-886f-4824-a0b8-2c99e0a9e6e6","_postman_id":"c5b660d6-886f-4824-a0b8-2c99e0a9e6e6","description":""},{"name":"posts","item":[{"name":"comments","item":[{"name":"http://localhost:9000/posts/1/comment","id":"2274857a-cd36-40e0-800a-349a09ab7ef2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": 2,\r\n    \"content\": \"I will get you next time BATMAN! LOL xD\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/posts/1/comment","description":"<p>Comment on a post</p>\n","urlObject":{"protocol":"http","port":"9000","path":["posts","1","comment"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2274857a-cd36-40e0-800a-349a09ab7ef2"},{"name":"http://localhost:9000/comments/1","id":"27abd7fe-bd17-4bcb-8c28-a2e279250706","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:9000/comments/1","description":"<p>Remove comment</p>\n","urlObject":{"protocol":"http","port":"9000","path":["comments","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"27abd7fe-bd17-4bcb-8c28-a2e279250706"}],"id":"a4c3d3ac-0180-4203-8a49-703b0133a8bd","_postman_id":"a4c3d3ac-0180-4203-8a49-703b0133a8bd","description":""},{"name":"likes","item":[{"name":"http://localhost:9000/posts/1/like","id":"338539dd-cd25-4792-8458-a28ec2f40d4f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/posts/1/like","description":"<p>Like a post by user</p>\n","urlObject":{"protocol":"http","port":"9000","path":["posts","1","like"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"338539dd-cd25-4792-8458-a28ec2f40d4f"},{"name":"http://localhost:9000/posts/1/dislike","id":"449361d3-b6ed-47d5-8976-d14a7c1b2e06","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"userId\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/posts/1/dislike","description":"<p>Dislike a post by user</p>\n","urlObject":{"protocol":"http","port":"9000","path":["posts","1","dislike"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"449361d3-b6ed-47d5-8976-d14a7c1b2e06"}],"id":"807b6ee3-c818-4398-9b65-daaf5e8a9dbe","_postman_id":"807b6ee3-c818-4398-9b65-daaf5e8a9dbe","description":""},{"name":"http://localhost:9000/posts","id":"c00738d4-2b5b-4d3b-bde9-1f13f072a383","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"photo","type":"file","src":"/C:/Users/Mark/Pictures/insta-clone/batsignal.jpg"},{"key":"description","value":" Ready for some action!","type":"text"},{"key":"userId","value":"1","type":"text"}]},"url":"http://localhost:9000/posts","description":"<p>Posts Api (get, post)</p>\n<p>needs to me form-data on post request.</p>\n","urlObject":{"protocol":"http","port":"9000","path":["posts"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c00738d4-2b5b-4d3b-bde9-1f13f072a383"},{"name":"http://localhost:9000/posts/1","id":"6a346636-6cba-4358-896e-c5f1245a0808","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"description\": \"Watching over Gotham city.\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/posts/1","description":"<p>Post Api</p>\n<p>(get, patch, delete)</p>\n","urlObject":{"protocol":"http","port":"9000","path":["posts","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6a346636-6cba-4358-896e-c5f1245a0808"}],"id":"6e0a4065-ba22-4d01-9c8e-bb585f9edd2b","_postman_id":"6e0a4065-ba22-4d01-9c8e-bb585f9edd2b","description":""},{"name":"auth","item":[{"name":"http://localhost:9000/auth/login","id":"711eb424-a687-4bbd-ba09-67d2db146cf8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"batman\",\r\n    \"password\": \"batman\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/auth/login","description":"<p>Login user and return token</p>\n","urlObject":{"protocol":"http","port":"9000","path":["auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"711eb424-a687-4bbd-ba09-67d2db146cf8"},{"name":"http://localhost:9000/auth/register","id":"b79bc8ce-ce78-4535-aae5-a6f0277314eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"joker\",\r\n    \"password\": \"batman\",\r\n    \"email\": \"jacknapier@gotham.com\",\r\n    \"name\": \"Joker\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:9000/auth/register","description":"<p>Register a new user</p>\n","urlObject":{"protocol":"http","port":"9000","path":["auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b79bc8ce-ce78-4535-aae5-a6f0277314eb"}],"id":"c6843dfe-3ba3-4105-a505-addaafa42808","_postman_id":"c6843dfe-3ba3-4105-a505-addaafa42808","description":""}],"event":[{"listen":"prerequest","script":{"id":"9828aa72-a48a-49b8-bdb6-49391652ffe9","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"e3e0b102-b340-495e-a198-ded6bac4e204","type":"text/javascript","exec":[""]}}]}