{"info":{"_postman_id":"89cc1d0b-b78a-4a56-835f-d99773d03e4e","name":"RBAC Auth Service","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"11144664","collectionId":"89cc1d0b-b78a-4a56-835f-d99773d03e4e","publishedId":"2s946mZ9eL","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-07-22T13:32:59.000Z"},"item":[{"name":"Signup","id":"e70e32a7-f01b-440f-ab1d-42b254bf7a29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"harsh\",\n    \"email\": \"harsh@gmail.com\",\n    \"password\": \"Harsh@123\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/users/signup","urlObject":{"protocol":"http","port":"3000","path":["users","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e70e32a7-f01b-440f-ab1d-42b254bf7a29"},{"name":"Login","id":"73e5f3c9-7db0-49a0-b65b-7e5d23dd82b4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"admin\",\n    \"email\": \"admin@gmail.com\",\n    \"password\": \"admin123\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/users/login","urlObject":{"protocol":"http","port":"3000","path":["users","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"73e5f3c9-7db0-49a0-b65b-7e5d23dd82b4"},{"name":"Verify email","id":"d1a2ecd2-d98c-498e-b014-0eecde27c7ca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"url":"http://localhost:3000/users/verify/harsh","urlObject":{"protocol":"http","port":"3000","path":["users","verify","harsh"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d1a2ecd2-d98c-498e-b014-0eecde27c7ca"},{"name":"Activate user","id":"e62fedae-8085-44d3-89b3-b85e638fdaed","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:3000/users/activate/harsh/9bc44cf6-9a46-4d1e-bac6-bec3cd343ad7","urlObject":{"protocol":"http","port":"3000","path":["users","activate","harsh","9bc44cf6-9a46-4d1e-bac6-bec3cd343ad7"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e62fedae-8085-44d3-89b3-b85e638fdaed"},{"name":"Get current user","id":"766c8548-bdbb-4c5d-ab6a-a9cc1a037c4c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/users/me","urlObject":{"protocol":"http","port":"3000","path":["users","me"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"766c8548-bdbb-4c5d-ab6a-a9cc1a037c4c"},{"name":"Get all users","id":"3a921f8d-bf93-4886-a848-04e77bfc8028","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/users","urlObject":{"protocol":"http","port":"3000","path":["users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3a921f8d-bf93-4886-a848-04e77bfc8028"},{"name":"Get user by Username","id":"183cbec2-0c1a-4e46-9ae6-a9b9addae088","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/users/harsh","urlObject":{"protocol":"http","port":"3000","path":["users","harsh"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"183cbec2-0c1a-4e46-9ae6-a9b9addae088"},{"name":"Deactivate user","id":"c845d182-ad78-4ffb-b507-a77637ade470","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:3000/users/deactivate/harsh","urlObject":{"protocol":"http","port":"3000","path":["users","deactivate","harsh"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c845d182-ad78-4ffb-b507-a77637ade470"},{"name":"Delete user","id":"77f70397-1e85-4c58-b0dd-5f197c76bd11","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/users/harsh","urlObject":{"protocol":"http","port":"3000","path":["users","harsh"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"77f70397-1e85-4c58-b0dd-5f197c76bd11"},{"name":"Bulk upload users","id":"27754d2f-f799-4d04-a328-b290cd3bdec7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"users","type":"file","src":"/Users/harsh/Desktop/users.csv"}]},"url":"http://localhost:3000/users/upload","urlObject":{"protocol":"http","port":"3000","path":["users","upload"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"27754d2f-f799-4d04-a328-b290cd3bdec7"},{"name":"Create task","id":"1c44d3db-4c73-4093-9405-32df7c0688eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Sample Task\",\n    \"description\": \"Sample Task Description\",\n    \"asignees\": [\"harsh\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/tasks/","urlObject":{"protocol":"http","port":"3000","path":["tasks",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1c44d3db-4c73-4093-9405-32df7c0688eb"},{"name":"Get tasks","id":"fb74a2bb-f3a6-4695-a416-c921e14bd99a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/tasks/","urlObject":{"protocol":"http","port":"3000","path":["tasks",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fb74a2bb-f3a6-4695-a416-c921e14bd99a"},{"name":"Get task by ID","id":"bf30dc2b-ecb2-4ac9-b16b-026c7634c656","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/tasks/1","urlObject":{"protocol":"http","port":"3000","path":["tasks","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bf30dc2b-ecb2-4ac9-b16b-026c7634c656"},{"name":"Delete task","id":"2706e7a9-0f2c-4383-bccf-628373b926b3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/tasks/1","urlObject":{"protocol":"http","port":"3000","path":["tasks","1"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2706e7a9-0f2c-4383-bccf-628373b926b3"},{"name":"Bulk upload tasks","id":"d39fd965-0ea5-47fd-a761-970b8a838df1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"tasks","type":"file","src":"/Users/harsh/Desktop/tasks.csv"}]},"url":"http://localhost:3000/tasks/upload","urlObject":{"protocol":"http","port":"3000","path":["tasks","upload"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d39fd965-0ea5-47fd-a761-970b8a838df1"},{"name":"Assign task to users","id":"9a413ede-f53a-4b64-a8b6-92fe87b53cda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"asignees\": [\"harsh\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/tasks/2/asignees","urlObject":{"protocol":"http","port":"3000","path":["tasks","2","asignees"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9a413ede-f53a-4b64-a8b6-92fe87b53cda"},{"name":"Create group","id":"e32c22bc-be4a-4225-bee1-7a0e340472eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Sockets\",\n    \"description\": \"Sockets and Livestreaming\",\n    \"users\": [\"harsh\"],\n    \"permissions\": [\"create_tasks\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/groups/","urlObject":{"protocol":"http","port":"3000","path":["groups",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e32c22bc-be4a-4225-bee1-7a0e340472eb"},{"name":"Get groups","id":"1cecd329-7c85-4a19-99f4-5b8a74c2172e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/groups/","urlObject":{"protocol":"http","port":"3000","path":["groups",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1cecd329-7c85-4a19-99f4-5b8a74c2172e"},{"name":"Get group by name","id":"342bb72d-9b5b-467e-9dab-135c63b5d810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/groups/Sockets","urlObject":{"protocol":"http","port":"3000","path":["groups","Sockets"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"342bb72d-9b5b-467e-9dab-135c63b5d810"},{"name":"Update group (PUT)","id":"96cc9745-54a0-49e9-942a-a2c4fed20ee7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Livestream\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/groups/Sockets","urlObject":{"protocol":"http","port":"3000","path":["groups","Sockets"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"96cc9745-54a0-49e9-942a-a2c4fed20ee7"},{"name":"Update group (PATCH)","id":"2fc88487-5725-4658-b2de-4bde53ea8d47","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"description\": \"Sockets and Livestreaming\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/groups/Livestream","urlObject":{"protocol":"http","port":"3000","path":["groups","Livestream"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2fc88487-5725-4658-b2de-4bde53ea8d47"},{"name":"Delete group","id":"de9b8e9e-201f-4275-a472-73b48f86efe9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:3000/groups/Livestream","urlObject":{"protocol":"http","port":"3000","path":["groups","Livestream"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"de9b8e9e-201f-4275-a472-73b48f86efe9"},{"name":"Add permissions to group","id":"9c7b0cf2-83fa-496e-bd1a-1f273a5f6db5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"permissions\": [\"update_tasks\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/groups/Livestream/permissions","urlObject":{"protocol":"http","port":"3000","path":["groups","Livestream","permissions"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9c7b0cf2-83fa-496e-bd1a-1f273a5f6db5"},{"name":"Add users to group","id":"31654c0d-8788-437d-846a-6fef45cbd78e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"users\": [\"harsh\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/groups/Livestream/users","urlObject":{"protocol":"http","port":"3000","path":["groups","Livestream","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"31654c0d-8788-437d-846a-6fef45cbd78e"},{"name":"Create role","id":"d126f038-604a-42c6-b98a-6a7342ceacae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Manager\",\n    \"description\": \"This role belongs to a Manager\",\n    \"users\": [\"harsh\"],\n    \"permissions\": [\"create_tasks\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/roles","urlObject":{"protocol":"http","port":"3000","path":["roles"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d126f038-604a-42c6-b98a-6a7342ceacae"},{"name":"Get roles","id":"b3bcf785-7bf1-4bd5-ad3c-5cfb0206b5ae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/roles","urlObject":{"protocol":"http","port":"3000","path":["roles"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b3bcf785-7bf1-4bd5-ad3c-5cfb0206b5ae"},{"name":"Get role by name","id":"8f53b862-80e6-4ee7-b395-753066e81d50","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/roles/Manager","urlObject":{"protocol":"http","port":"3000","path":["roles","Manager"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f53b862-80e6-4ee7-b395-753066e81d50"},{"name":"Update role (PUT)","id":"97fced3b-4a37-4108-8d5a-3dad345fa930","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"Leader\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/roles/Manager","urlObject":{"protocol":"http","port":"3000","path":["roles","Manager"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"97fced3b-4a37-4108-8d5a-3dad345fa930"},{"name":"Update role (PATCH)","id":"52b25b4b-4ca1-4f30-b9c7-e0feab906f1b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"description\": \"This role belongs to a leader\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/roles/Leader","urlObject":{"protocol":"http","port":"3000","path":["roles","Leader"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"52b25b4b-4ca1-4f30-b9c7-e0feab906f1b"},{"name":"Add permissions to role","id":"00d746a3-2387-475d-bd7e-6d9b02458db2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"permissions\": [\"update_tasks\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/roles/Leader/permissions","urlObject":{"protocol":"http","port":"3000","path":["roles","Leader","permissions"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"00d746a3-2387-475d-bd7e-6d9b02458db2"},{"name":"Assigjn role to user","id":"1378852b-8b34-445c-8f42-bac309b6daea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"users\": [\"harsh\"]\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:3000/roles/Leader/users","urlObject":{"protocol":"http","port":"3000","path":["roles","Leader","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1378852b-8b34-445c-8f42-bac309b6daea"},{"name":"Get users by role","id":"54e88fe3-868c-4dce-b077-1f53fbc1633b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:3000/roles/Leader/users","urlObject":{"protocol":"http","port":"3000","path":["roles","Leader","users"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"54e88fe3-868c-4dce-b077-1f53fbc1633b"}]}