{"info":{"_postman_id":"8639ae16-b97e-4158-ae44-a69b806aec75","name":"codechisel","description":"<html><head></head><body><p><strong>CodeChisel</strong> is a <strong>code learning platform</strong> that offers interactive coding quizzes and assessments and courses. This API enables users to create, retrieve, and submit quizzes.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"39217082","collectionId":"8639ae16-b97e-4158-ae44-a69b806aec75","publishedId":"2sAYQiBnrB","public":true,"customColor":{"top-bar":"8F6CD5","right-sidebar":"303030","highlight":"8F6CD5"},"publishDate":"2025-01-29T10:19:44.000Z"},"item":[{"name":"login","item":[{"name":"New Request","id":"4058ff00-ac7c-4bf6-90a8-d12829b75a6a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"werf\",\r\n  \"email\": \"tet@example.com\",\r\n  \"password\": \"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/login/register","description":"<p>user can register themself in codechisel website using username and password.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["login","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"bd738830-270c-4797-b516-874fb09e4cc0","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"werf\",\r\n  \"email\": \"tet@example.com\",\r\n  \"password\": \"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/login/register"},"status":"Created","code":201,"_postman_previewlanguage":"html","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Access-Control-Allow-Origin","value":"http://localhost:3000"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"text/html; charset=utf-8"},{"key":"Content-Length","value":"49"},{"key":"ETag","value":"W/\"31-fjCOQnt23TW2Werj8kKuxrMv2nw\""},{"key":"Date","value":"Mon, 03 Feb 2025 17:24:28 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"User registered with ID: 67a0fbcb48b54204d2c932d9"}],"_postman_id":"4058ff00-ac7c-4bf6-90a8-d12829b75a6a"},{"name":"New Request","id":"9653b704-6e15-47a7-b7ae-1887688499d8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"usernameOrEmail\": \"werf\",\r\n    \"password\": \"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/login/login","description":"<p>user can login using in codechisel website using correct username and password.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["login","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9653b704-6e15-47a7-b7ae-1887688499d8"},{"name":"New Request","id":"c932a454-676b-4cec-a132-86b391a84a52","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/protected/","description":"<p>If a user successfully logs in, they will see a welcome message displaying their username.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["protected",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c932a454-676b-4cec-a132-86b391a84a52"},{"name":"New Request","id":"6f53bf77-50cd-4704-b13e-15b914efe4a2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"yashvi\",\r\n    \"password\": \"2106\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/login/logout","description":"<p>user can logout using correct username and password</p>\n","urlObject":{"protocol":"http","port":"4000","path":["login","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6f53bf77-50cd-4704-b13e-15b914efe4a2"}],"id":"63050c34-746d-4ad2-ae81-46ea7fef1f88","description":"<p>🔐 This API allows users to <strong>log in</strong> to the CodeChisel platform using <strong>session-based authentication</strong>. Upon successful login, a session is created, and a <strong>session cookie</strong> is stored for subsequent requests.</p>\n","_postman_id":"63050c34-746d-4ad2-ae81-46ea7fef1f88"},{"name":"courses","item":[{"name":"New Request","id":"76aa9662-b817-428c-bda1-d3be102423a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"\r\n{\r\n   \"title\": \"introduction to python\",\r\n   \"icon\":\"🐍\",\r\n  \"description\": \"An introductory course on python.\"\r\n}\r\n\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/courses/addCourses","description":"<p>Admin can add courses.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["courses","addCourses"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"76aa9662-b817-428c-bda1-d3be102423a0"},{"name":"New Request","id":"f4e68b4e-0590-4b92-b418-941271bde16d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://codechisel.onrender.com/courses/all","description":"<p>Fetches a list of all available courses.</p>\n","urlObject":{"protocol":"https","path":["courses","all"],"host":["codechisel","onrender","com"],"query":[],"variable":[]}},"response":[],"_postman_id":"f4e68b4e-0590-4b92-b418-941271bde16d"},{"name":"New Request","id":"3dd4c32c-2988-4985-b794-5433b2764d35","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"Advanced JavaScript\",\r\n  \"description\": \"Master advanced concepts in JavaScript.\",\r\n  \"author\": \"Jane Smith\",\r\n  \"duration\": \"5 hours\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/courses/update/679722010869827c554a9083","description":"<p>Admin can edit courses.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["courses","update","679722010869827c554a9083"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3dd4c32c-2988-4985-b794-5433b2764d35"},{"name":"New Request","id":"5ac2045c-db1f-4450-823c-d7a6325fa329","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:4000/courses/delete/67971b300d1199eff2892259","description":"<p>Admin can delete courses.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["courses","delete","67971b300d1199eff2892259"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5ac2045c-db1f-4450-823c-d7a6325fa329"}],"id":"c446a381-b3e3-4149-8dc1-af1eadc61c87","description":"<p>The <strong>Courses API</strong> allows users to <strong>retrieve available courses</strong> on CodeChisel. Admins may also create and manage courses.</p>\n","_postman_id":"c446a381-b3e3-4149-8dc1-af1eadc61c87"},{"name":"content","item":[{"name":"New Request","id":"88b3d5c3-1b9e-49a0-bffc-f5894acc60f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"javascript\",\r\n  \"body\": \"This is the body content of the javascript post.\",\r\n  \"author\": \"lewis\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/content","description":"<p>create new content.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["content"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"88b3d5c3-1b9e-49a0-bffc-f5894acc60f5"},{"name":"New Request","id":"240bbb22-19b6-4054-a6c7-b3dd93ed8546","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/content","description":"<p>Fetches a list of all available content.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["content"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"240bbb22-19b6-4054-a6c7-b3dd93ed8546"},{"name":"New Request","id":"917f6e71-44d2-42bd-81eb-3f0933ad8e8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/content/6797b1abe06319c8e29e80b4","description":"<p>Fetches details of a specific content piece by <strong>ID</strong>.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["content","6797b1abe06319c8e29e80b4"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"917f6e71-44d2-42bd-81eb-3f0933ad8e8d"},{"name":"New Request","id":"a66c725c-a6ee-489d-9e31-fcf334a47631","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"python\",\r\n  \"body\": \"content of python\",\r\n  \"author\": \"louis\",\r\n  \"status\": \"published\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/content/67975dd388b2140ad91617c8","description":"<p>update content.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["content","67975dd388b2140ad91617c8"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a66c725c-a6ee-489d-9e31-fcf334a47631"},{"name":"New Request","id":"f81f41c2-f7b3-4487-a09f-dcbe2e5ba529","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:4000/content/67975dd388b2140ad91617c8","description":"<p>Deletes a specific content piece by <strong>ID.</strong></p>\n","urlObject":{"protocol":"http","port":"4000","path":["content","67975dd388b2140ad91617c8"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"f81f41c2-f7b3-4487-a09f-dcbe2e5ba529"}],"id":"71827241-7ac5-47cc-ab9e-969b715dbefa","description":"<p>📝 The <strong>Content API</strong> allows users to <strong>create, retrieve, update, and delete learning content</strong> for the CodeChisel platform. Content include articles, tutorials, or educational resources.</p>\n","_postman_id":"71827241-7ac5-47cc-ab9e-969b715dbefa"},{"name":"quiz","item":[{"name":"New Request","id":"44adffdf-df14-4254-b010-8d10402ae1cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"JavaScript Basics\",\r\n  \"description\": \"A quiz on JavaScript fundamentals\",\r\n  \"courseId\": \"65abc123456789abcdef1234\",\r\n  \"questions\": [\r\n    {\r\n      \"type\": \"multiple-choice\",\r\n      \"question\": \"What is the output of `console.log(typeof null)`?\",\r\n      \"options\": [\"null\", \"object\", \"undefined\", \"number\"],\r\n      \"correctAnswer\": \"object\",\r\n      \"points\": 10\r\n    }\r\n  ]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/quizzes","description":"<p><strong>To create a quiz.</strong></p>\n","urlObject":{"protocol":"http","port":"4000","path":["quizzes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"44adffdf-df14-4254-b010-8d10402ae1cf"},{"name":"New Request","id":"4ad7fd25-7d83-441a-adb0-de616fa79488","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/quizzes","description":"<p>fetch all available quizzes.</p>\n","urlObject":{"protocol":"http","port":"4000","path":["quizzes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4ad7fd25-7d83-441a-adb0-de616fa79488"},{"name":"New Request","id":"46e24c97-6d08-4e8e-b266-0f4f4388b97e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:4000/quizzes/6799bff8b0ca21a329166c8d","description":"<p><strong>To retrieve a specific quiz.</strong></p>\n","urlObject":{"protocol":"http","port":"4000","path":["quizzes","6799bff8b0ca21a329166c8d"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"46e24c97-6d08-4e8e-b266-0f4f4388b97e"},{"name":"New Request","id":"01addc5d-a459-43b8-9b27-d1d4a4dad294","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"userId\": \"65xyz987654321abcdef6789\",\r\n  \"answers\": [\"object\"]\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/submissions/6799bff8b0ca21a329166c8d/submit","description":"<p><strong>To submit answers for a specific quiz.</strong></p>\n","urlObject":{"protocol":"http","port":"4000","path":["submissions","6799bff8b0ca21a329166c8d","submit"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"01addc5d-a459-43b8-9b27-d1d4a4dad294"}],"id":"ea5ef97b-1459-4f3e-a3f9-cf9429b5ef11","description":"<p>📝 The <strong>Quiz API</strong> allows users to <strong>create, retrieve, and manage quizzes</strong> for courses on the CodeChisel platform.</p>\n","_postman_id":"ea5ef97b-1459-4f3e-a3f9-cf9429b5ef11"},{"name":"notes","item":[{"name":"New Request","id":"28ff6946-d4fe-4297-bbd3-36d912c90b4a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"title\": \"React Basics\",\r\n  \"content\": \"Understanding React components and JSX\",\r\n  \"color\": \"#b3ffcc\"\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/notes","urlObject":{"protocol":"http","port":"4000","path":["api","notes"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"28ff6946-d4fe-4297-bbd3-36d912c90b4a"},{"name":"New Request","id":"b74b74eb-9fe1-4061-804e-a87e53286507","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"b74b74eb-9fe1-4061-804e-a87e53286507"},{"name":"New Request","id":"1f7621d3-490f-436e-8455-3623d77906e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"1f7621d3-490f-436e-8455-3623d77906e1"}],"id":"f55a9989-9123-43ea-aeba-f81791d72218","_postman_id":"f55a9989-9123-43ea-aeba-f81791d72218","description":""},{"name":"leaderboard","item":[{"name":"New Request","id":"7e13d90f-a920-40e3-a3ff-09ff68faad2e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"priyasha_14\",\r\n  \"score\": 50\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/leaderboard/update-score","urlObject":{"protocol":"http","port":"4000","path":["api","leaderboard","update-score"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"bfd9862d-d8c5-4b46-9ef0-45000707dea6","name":"New Request","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n  \"username\": \"priyasha_14\",\r\n  \"score\": 50\r\n}\r\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:4000/api/leaderboard/update-score"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Vary","value":"Origin"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"152"},{"key":"ETag","value":"W/\"98-x4vCSnC0scyK1fHuibpYm1bxnu8\""},{"key":"Date","value":"Sat, 01 Mar 2025 07:43:48 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Score updated successfully\",\n    \"user\": {\n        \"username\": \"priyasha_14\",\n        \"totalScore\": 50,\n        \"quizzesAttempted\": 1,\n        \"_id\": \"67c2bab32c4547b908e662da\",\n        \"__v\": 0\n    }\n}"}],"_postman_id":"7e13d90f-a920-40e3-a3ff-09ff68faad2e"},{"name":"New Request","id":"60ca12ff-48a2-4618-8b80-a89aa757fe69","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"urlObject":{"query":[],"variable":[]},"url":""},"response":[],"_postman_id":"60ca12ff-48a2-4618-8b80-a89aa757fe69"}],"id":"ed9db604-b4c2-4ad0-980f-9246b5ec694a","_postman_id":"ed9db604-b4c2-4ad0-980f-9246b5ec694a","description":""}]}