{"info":{"_postman_id":"b0c25f13-311d-46cd-a10d-072e00d1db71","name":"Role-based-api-eclass","description":"<html><head></head><body><h1 id=\"introduction\">Introduction</h1>\n<p>e-class managment api</p>\n<h1 id=\"authentication\">Authentication</h1>\n<p>JWT bearer token</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[{"content":"Introduction","slug":"introduction"},{"content":"Authentication","slug":"authentication"}],"owner":"7448955","collectionId":"b0c25f13-311d-46cd-a10d-072e00d1db71","publishedId":"SWTHbFc4","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-02-09T00:05:14.000Z"},"item":[{"name":"User","item":[{"name":"Create User (Admin)","id":"933417c9-8934-4b24-9144-7dfc718789fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"name\": \"Student Name 5\",\n\"email\":\"s5@gmail.com\",\n\"password\": \"marios\",\n\"userRole\": \"student\"\n}\n"},"url":"localhost:8080/user/create","description":"<p>Creates a new User</p>\n","urlObject":{"port":"8080","path":["user","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"933417c9-8934-4b24-9144-7dfc718789fc"},{"name":"Get User Info (A,S,T)","id":"c6937440-5cb1-45ee-b28f-3c16e1bfef9d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":""},"url":"localhost:8080/user/","urlObject":{"port":"8080","path":["user",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c6937440-5cb1-45ee-b28f-3c16e1bfef9d"},{"name":"Get All Users (Admin)","id":"e5faa440-6517-4964-9156-5ec4b9e70627","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/user/getAllUsers","urlObject":{"port":"8080","path":["user","getAllUsers"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e5faa440-6517-4964-9156-5ec4b9e70627"},{"name":"Get User Info By ID (Admin)","id":"9275f42f-feb1-41a9-b8be-c4934895b041","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/user/5e243b09839e7e0ccc4221d0","urlObject":{"port":"8080","path":["user","5e243b09839e7e0ccc4221d0"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9275f42f-feb1-41a9-b8be-c4934895b041"},{"name":"Update User By Id (Admin)","id":"4f455823-6e34-43f3-baed-5adc5e7e320b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"name\": \"George Student\",\n\"email\":\"newstudent1@gmail.com\",\n\"password\": \"\"\n}\n"},"url":"localhost:8080/user/5e3b2cd6da506d2274e9ee7a","urlObject":{"port":"8080","path":["user","5e3b2cd6da506d2274e9ee7a"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4f455823-6e34-43f3-baed-5adc5e7e320b"},{"name":"Update User (A,S,T)","id":"805dd586-c059-4f4b-83d8-435c58485b36","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\"name\": \"George Student\",\n\"email\":\"newstudent1@gmail.com\",\n\"password\": \"\"\n}\n"},"url":"localhost:8080/user/","urlObject":{"port":"8080","path":["user",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"805dd586-c059-4f4b-83d8-435c58485b36"},{"name":"DELETE USER (ADMIN)","id":"c7c0791a-3dd6-4742-8aac-5d65cb197606","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"localhost:8080/user/5e3f0468e8021822d0d714ec","urlObject":{"port":"8080","path":["user","5e3f0468e8021822d0d714ec"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c7c0791a-3dd6-4742-8aac-5d65cb197606"}],"id":"606c4b21-dad6-439e-83d1-0ae85210b025","_postman_id":"606c4b21-dad6-439e-83d1-0ae85210b025","description":""},{"name":"Auth","item":[{"name":"Login User","id":"bd0fab90-45d5-4cb5-bf62-b3b75a123829","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"email\": \"admin@admin.com\",\n\t\"password\": \"administrator\"\n}"},"url":"localhost:8080/auth/login","description":"<p>Login user</p>\n","urlObject":{"port":"8080","path":["auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bd0fab90-45d5-4cb5-bf62-b3b75a123829"},{"name":"Logout ALL","id":"bca9d56c-77bb-4e39-b8ea-feedaa16435b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/auth/logout","urlObject":{"port":"8080","path":["auth","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bca9d56c-77bb-4e39-b8ea-feedaa16435b"},{"name":"Logout From All devices (ALL)","id":"b77675be-5cd2-4514-9951-543978443771","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/auth/logoutall","urlObject":{"port":"8080","path":["auth","logoutall"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b77675be-5cd2-4514-9951-543978443771"}],"id":"3ab56298-8282-40ae-b2f4-893d44378242","_postman_id":"3ab56298-8282-40ae-b2f4-893d44378242","description":""},{"name":"Lesson","item":[{"name":"Create Lesson (Admin)","id":"844054f8-0497-4087-a4e1-206a8b2b0553","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"title\": \"Math 1\",\n\t\"teacher\": \"5e1b6d70fe687346783c73e5\"\n}"},"url":"localhost:8080/lesson/create","urlObject":{"port":"8080","path":["lesson","create"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"844054f8-0497-4087-a4e1-206a8b2b0553"},{"name":"Enroll Student to Lesson (Admin)","id":"cb74930c-80c9-41ef-a7fd-d648f1417163","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"student\":\"5e1a4579c53aeb4368aeb77b\",\n\t\"lesson\":\"5e1b6e5a43299d389c515689\"\n}"},"url":"localhost:8080/lesson/enroll","urlObject":{"port":"8080","path":["lesson","enroll"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cb74930c-80c9-41ef-a7fd-d648f1417163"},{"name":"Get All Lessons (Admin)","id":"00b6c315-de1b-45bf-bb80-85a72d2fded4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/lesson/getAllLessons","urlObject":{"port":"8080","path":["lesson","getAllLessons"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"00b6c315-de1b-45bf-bb80-85a72d2fded4"}],"id":"9fe89865-a34b-4b9a-82b3-d793ab677df8","_postman_id":"9fe89865-a34b-4b9a-82b3-d793ab677df8","description":""},{"name":"Grade","item":[{"name":"Add Grade (Teacher)","id":"e2e110fc-e5f5-435b-a5e2-ebd0da2441ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","value":"application/json","type":"text"}],"body":{"mode":"raw","raw":"{\n\t\"grade\": 8,\n\t\"student\": \"5e1a4579c53aeb4368aeb77b\"\n}"},"url":"localhost:8080/grade/add","urlObject":{"port":"8080","path":["grade","add"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e2e110fc-e5f5-435b-a5e2-ebd0da2441ea"}],"id":"b63d762b-7851-4282-846e-5d5aaa3d2d6d","_postman_id":"b63d762b-7851-4282-846e-5d5aaa3d2d6d","description":""},{"name":"Teacher","item":[{"name":"Get Teacher Lesson (Teacher)","id":"522c1335-d704-4060-a949-e63b82e123e7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/teacher/getteacherlesson","urlObject":{"port":"8080","path":["teacher","getteacherlesson"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"522c1335-d704-4060-a949-e63b82e123e7"},{"name":"Get Teacher Without Lesson (Admin)","id":"22bc66b8-2a49-4cf8-906b-4e7feb6157eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/teacher/getTeachersWithoutLesson","urlObject":{"port":"8080","path":["teacher","getTeachersWithoutLesson"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"22bc66b8-2a49-4cf8-906b-4e7feb6157eb"}],"id":"fceb8983-15d8-4c35-83b8-0f2e2741bbb3","_postman_id":"fceb8983-15d8-4c35-83b8-0f2e2741bbb3","description":""},{"name":"Student","item":[{"name":"Get enrolled lessons (Student)","id":"4b93960d-ec60-48d4-b8e8-14fb4b03b8e4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":"localhost:8080/student/getallenrolledlessons","urlObject":{"port":"8080","path":["student","getallenrolledlessons"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4b93960d-ec60-48d4-b8e8-14fb4b03b8e4"},{"name":"Get Not Enrolled Students (Admin)","id":"b6970725-7e55-40d5-93b6-8c2468e5718f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/student/getNotEnrolledStudents/5e243b09839e7e0ccc4221cb","urlObject":{"port":"8080","path":["student","getNotEnrolledStudents","5e243b09839e7e0ccc4221cb"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b6970725-7e55-40d5-93b6-8c2468e5718f"}],"id":"d13a1b44-eaaf-4f9a-bec2-ec129dbffbad","_postman_id":"d13a1b44-eaaf-4f9a-bec2-ec129dbffbad","description":""},{"name":"Generate Admin","id":"04b08f94-7740-497b-bf88-1e7ce1d9c6fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8080/generateadmin","urlObject":{"port":"8080","path":["generateadmin"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"04b08f94-7740-497b-bf88-1e7ce1d9c6fc"},{"name":"Generate Data (admin)","id":"241e3678-a202-4b58-977d-d171ab0c5cad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"localhost:8080/generatedata","urlObject":{"port":"8080","path":["generatedata"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"241e3678-a202-4b58-977d-d171ab0c5cad"}]}