{"info":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","description":"<html><head></head><body><p>Q&amp;A Laravel Restful API</p>\n<p>Questions and answers to the questions can be posted by registered users. And also every question and answer can have votes. Anyone can see Questions and Answers but Update, Delete, Vote and some other actions need Authorization.</p>\n<p>Authorization is implemented using sanctum. When user sign in using email and password he/she gets an Auth Token. If a route needs Authorization then the user has to pass the Auth Token with Request to access the route.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"14495874","collectionId":"f7f15377-1787-46b5-9709-afa3aaeff7f2","publishedId":"UVXjKvqn","public":true,"customColor":{"top-bar":"101B2F","right-sidebar":"152B44","highlight":"2DD4BF"},"publishDate":"2022-01-15T12:10:02.000Z"},"item":[{"name":"Authentication","item":[{"name":"Register User","id":"3b987a9b-f211-4a83-ae75-5c580c566c73","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"name","value":"Rishan Darshana","type":"text"},{"key":"email","value":"rishandarshana@gmail.com","type":"text"},{"key":"password","value":"12345678","type":"text"},{"key":"password_confirmation","value":"12345678","type":"text"},{"key":"role_id","value":"1","type":"text"}]},"url":"http://localhost:8000/api/v1/auth/register","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"protocol":"http","port":"8000","path":["api","v1","auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3b987a9b-f211-4a83-ae75-5c580c566c73"},{"name":"Logout User","id":"67606858-6c47-490d-a7e7-0e339fd42895","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/auth/logout","urlObject":{"port":"8000","path":["api","v1","auth","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"67606858-6c47-490d-a7e7-0e339fd42895"},{"name":"Login User","id":"9d4c5ab0-6856-4e59-9a28-86703d575541","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"email","value":"rishandarshana@gmail.com","type":"text"},{"key":"password","value":"12345678","type":"text"},{"key":"email","value":"hasunnilupul21@gmail.com","type":"text","disabled":true},{"key":"password","value":"123456","type":"text","disabled":true}]},"url":"localhost:8000/api/v1/auth/login","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"port":"8000","path":["api","v1","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9d4c5ab0-6856-4e59-9a28-86703d575541"}],"id":"a56ce11a-2342-4212-ac2c-68b4464bd8a5","_postman_id":"a56ce11a-2342-4212-ac2c-68b4464bd8a5","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}}},{"name":"Question Resource","item":[{"name":"All Questions","id":"4559bf1b-9b6d-4014-b9a2-660fa0ce7c2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/questions","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"port":"8000","path":["api","v1","questions"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4559bf1b-9b6d-4014-b9a2-660fa0ce7c2f"},{"name":"Single Question","id":"a5c73708-3efd-459e-ae63-947c42175d9c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/questions/8908024963/hello-world","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"port":"8000","path":["api","v1","questions","8908024963","hello-world"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a5c73708-3efd-459e-ae63-947c42175d9c"},{"name":"Single Question Shorten Link","id":"8f4f1e46-f889-4795-9956-d1c0e04107c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/q/8908024963","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"port":"8000","path":["api","v1","q","8908024963"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8f4f1e46-f889-4795-9956-d1c0e04107c7"},{"name":"Vote a Question","id":"dfd80707-043d-412b-8f91-c5bf82516cd3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"vote","value":"-1","type":"text"}]},"url":"localhost:8000/api/v1/questions/2221249657/test-question/vote","urlObject":{"port":"8000","path":["api","v1","questions","2221249657","test-question","vote"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"dfd80707-043d-412b-8f91-c5bf82516cd3"},{"name":"Bookmark a Question","id":"bb88a600-80d4-4bae-a28e-a39d28f8d4cb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/questions/4341328090/question-one/bookmarks","urlObject":{"port":"8000","path":["api","v1","questions","4341328090","question-one","bookmarks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"bb88a600-80d4-4bae-a28e-a39d28f8d4cb"},{"name":"Remove a Question from Bookmarks","id":"d7d35664-21e4-4374-b67a-600ce0935363","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/questions/4341328090/question-one/bookmarks","urlObject":{"port":"8000","path":["api","v1","questions","4341328090","question-one","bookmarks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d7d35664-21e4-4374-b67a-600ce0935363"},{"name":"Update Question","id":"b6e52c3f-a079-489b-bbd6-00561b67c945","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"title","value":"Question Three Updated","type":"text"},{"key":"body","value":"This is the third question in QA Demo web app updated.","type":"text"}]},"url":"localhost:8000/api/v1/questions/3718196224/question-three","urlObject":{"port":"8000","path":["api","v1","questions","3718196224","question-three"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b6e52c3f-a079-489b-bbd6-00561b67c945"},{"name":"Delete Question","id":"00baee84-96f4-47a9-8a17-86ddf8412c1d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":"localhost:8000/api/v1/questions/6990234446/question-one","urlObject":{"port":"8000","path":["api","v1","questions","6990234446","question-one"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"00baee84-96f4-47a9-8a17-86ddf8412c1d"},{"name":"New Question","id":"4a43404e-d2bf-456d-8837-2ac7ae3638a8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"title","value":"Question two","type":"text"},{"key":"body","value":"This is the first question of the web app","type":"text"}]},"url":"localhost:8000/api/v1/questions","urlObject":{"port":"8000","path":["api","v1","questions"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4a43404e-d2bf-456d-8837-2ac7ae3638a8"},{"name":"Edit Question","id":"8bea4ba7-cee5-42c1-b772-19f782603159","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/questions/3718196224/question-three/edit","urlObject":{"port":"8000","path":["api","v1","questions","3718196224","question-three","edit"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"8bea4ba7-cee5-42c1-b772-19f782603159"},{"name":"Search Questions","id":"a080b469-4102-4592-9dd7-1702d9ebd989","protocolProfileBehavior":{"disableBodyPruning":true,"followAuthorizationHeader":false},"request":{"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/questions/two","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"port":"8000","path":["api","v1","questions","two"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a080b469-4102-4592-9dd7-1702d9ebd989"}],"id":"f33d6d16-db2c-4a68-8fa3-d69b7d2bebdb","_postman_id":"f33d6d16-db2c-4a68-8fa3-d69b7d2bebdb","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}}},{"name":"Answer Resource","item":[{"name":"New Answer","id":"509d2eb7-3148-4f33-a9ac-437fe7bf643e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"body","value":"You said you get an AssertionError, and that it fails, but what exactly does the error say? What is the message? I find it hard to believe the AssertionError does not have a message that tells you more about what's wrong. You say it runs in your environment, but not on command line. Are you using the same JVM on command line as you do in your IDE?","type":"text"}]},"url":"localhost:8000/api/v1/questions/1688247606/answers","urlObject":{"port":"8000","path":["api","v1","questions","1688247606","answers"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"509d2eb7-3148-4f33-a9ac-437fe7bf643e"},{"name":"Edit Answer","id":"e19916e7-8303-433a-85f0-30034b5c5f22","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"localhost:8000/api/v1/questions/3010074931/answers/6365162735/edit","urlObject":{"port":"8000","path":["api","v1","questions","3010074931","answers","6365162735","edit"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e19916e7-8303-433a-85f0-30034b5c5f22"},{"name":"Single Answer Shorten Link","id":"3897758a-eee9-407a-88e3-3aa1a7bfa88a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"localhost:8000/api/v1/a/2527499784","urlObject":{"port":"8000","path":["api","v1","a","2527499784"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3897758a-eee9-407a-88e3-3aa1a7bfa88a"},{"name":"Accept an Answer","id":"4a4c4bff-6198-4ba3-ae9f-c22e8af1ccd2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"url":"localhost:8000/api/v1/answers/5576463094/vote","urlObject":{"port":"8000","path":["api","v1","answers","5576463094","vote"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4a4c4bff-6198-4ba3-ae9f-c22e8af1ccd2"},{"name":"Vote an Answer","id":"c0a4ef95-7286-45c2-9f20-54fe433341aa","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"vote","value":"1","type":"text"}]},"url":"localhost:8000/api/v1/answers/1041094459/vote","urlObject":{"port":"8000","path":["api","v1","answers","1041094459","vote"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c0a4ef95-7286-45c2-9f20-54fe433341aa"},{"name":"Update Answer","id":"6473fb62-3b4b-4cd3-827d-bea1ccce61e3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[{"key":"body","value":"Test answer for question two updated.","type":"text"}]},"url":"localhost:8000/api/v1/questions/3010074931/answers/6365162735","urlObject":{"port":"8000","path":["api","v1","questions","3010074931","answers","6365162735"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6473fb62-3b4b-4cd3-827d-bea1ccce61e3"},{"name":"Delete Answer","id":"40827392-bfa1-41e5-b7da-e3fd6a8d675c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[{"key":"Accept","value":"application/json","type":"text"}],"body":{"mode":"urlencoded","urlencoded":[]},"url":"localhost:8000/api/v1/questions/3010074931/answers/6365162735","urlObject":{"port":"8000","path":["api","v1","questions","3010074931","answers","6365162735"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"40827392-bfa1-41e5-b7da-e3fd6a8d675c"},{"name":"Single Question Answers","id":"554e1e1a-b25c-415b-8760-798d5eba16ea","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"localhost:8000/api/v1/answers/8908024963/3259808584","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}},"urlObject":{"port":"8000","path":["api","v1","answers","8908024963","3259808584"],"host":["localhost"],"query":[{"disabled":true,"key":"order","value":"active"},{"disabled":true,"key":"order","value":"oldest"},{"disabled":true,"key":"order","value":"votes"},{"disabled":true,"key":"page","value":"1"}],"variable":[]}},"response":[],"_postman_id":"554e1e1a-b25c-415b-8760-798d5eba16ea"}],"id":"c3e569fe-4d33-4d18-9196-485c6be06e4a","_postman_id":"c3e569fe-4d33-4d18-9196-485c6be06e4a","description":"","auth":{"type":"bearer","bearer":{"basicConfig":[]},"isInherited":true,"source":{"_postman_id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","id":"f7f15377-1787-46b5-9709-afa3aaeff7f2","name":"React QA API","type":"collection"}}}],"auth":{"type":"bearer","bearer":{"basicConfig":[]}},"event":[{"listen":"prerequest","script":{"id":"ef98126f-7ed7-4630-8939-f809ca10a24b","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"983668d6-ec4d-4ee6-9d57-bff290c2d4de","type":"text/javascript","exec":[""]}}]}