{"info":{"_postman_id":"30ab1b79-0e10-49c8-9d0d-f6abb2f98a11","name":"API documentation","description":"<html><head></head><body><p>Api Documentation for classroom server (Playpower labs backend assign)</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"24398247","collectionId":"30ab1b79-0e10-49c8-9d0d-f6abb2f98a11","publishedId":"2sA3Qs9rRc","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-05-27T13:04:36.000Z"},"item":[{"name":"user","item":[{"name":"login/student","event":[{"listen":"test","script":{"id":"c0468403-8534-4d66-8086-b511f4b41e9a","exec":[""],"type":"text/javascript","packages":{}}}],"id":"aab12e11-0afe-49ae-89d3-a0f20b0977f5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"student1\",\r\n    \"password\": \"student1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/user/login/student","description":"<p>If a student user account with provided username exists then logs in else creates a new student account.</p>\n<p>Request body should contain two fields</p>\n<ul>\n<li><p>username - a string value, these are unique across all accounts.</p>\n</li>\n<li><p>password - a string value that contains password for the username.</p>\n</li>\n</ul>\n<p>Response contains two cookies used for authenticating requests. Two cookie keys are accessToken and refreshToken.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"fed4c9b3-70f1-4af3-baeb-0d0e96bf7791","id":"fed4c9b3-70f1-4af3-baeb-0d0e96bf7791","name":"user","type":"folder"}},"urlObject":{"protocol":"https","path":["api","user","login","student"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"3a19d61d-c62b-4f38-af80-de7845837412","name":"login/student","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"student1\",\r\n    \"password\": \"student1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/user/login/student"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"21"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 11:16:06 GMT"},{"key":"Etag","value":"W/\"15-ga8EF/lp+ThIsc8w/OHbk4hPrME\""},{"key":"Server","value":"Vercel"},{"key":"Set-Cookie","value":"accessToken=s%3AeyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InN0dWRlbnQxIiwiaWF0IjoxNzE2ODA4NTY2LCJleHAiOjE3MTY4MTU3NjZ9.0aTWF4vLFY1DgDuSnGxgzJAfk4-BmsPSjRwnq4hT5wc.JAlKMwzglfEyZ%2FnRHrGVyK5TlW17eaHRlI%2B3aDt5xiM; Path=/; Expires=Mon, 27 May 2024 13:16:06 GMT; Secure; SameSite=None"},{"key":"Set-Cookie","value":"refreshToken=s%3AeyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InN0dWRlbnQxIiwiaWF0IjoxNzE2ODA4NTY2LCJleHAiOjE3MTgxMDQ1NjZ9.Hhz3TcpuvdRMyIERChR2d6lk-x5uxzHMqgJy-yZLf3E.w26DuCjlerLn6slaDs4xavskxNP3a0NbLWK1rwr8jv0; Path=/; Expires=Tue, 11 Jun 2024 11:16:06 GMT; Secure; SameSite=None"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::lbw87-1716808562957-566cd358f676"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"aab12e11-0afe-49ae-89d3-a0f20b0977f5"},{"name":"login/teacher","id":"7ff50f8a-83cd-460a-b35a-606891e73c23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"teacher1\",\r\n    \"password\": \"teacher1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/user/login/teacher","description":"<p>If a teacher user account with provided username exists then logs in else creates a new teacher account.</p>\n<p>Request body should contain two fields</p>\n<ul>\n<li><p>username - a string value, these are unique across all accounts.</p>\n</li>\n<li><p>password - a string value that contains password for the username.</p>\n</li>\n</ul>\n<p>Response contains two cookies used for authenticating requests. Two cookie keys are accessToken and refreshToken.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"fed4c9b3-70f1-4af3-baeb-0d0e96bf7791","id":"fed4c9b3-70f1-4af3-baeb-0d0e96bf7791","name":"user","type":"folder"}},"urlObject":{"protocol":"https","path":["api","user","login","teacher"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"679daecd-6732-4a33-8034-7f6947eba70d","name":"login/teacher","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"teacher1\",\r\n    \"password\": \"teacher1\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/user/login/teacher"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"21"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 11:19:30 GMT"},{"key":"Etag","value":"W/\"15-ga8EF/lp+ThIsc8w/OHbk4hPrME\""},{"key":"Server","value":"Vercel"},{"key":"Set-Cookie","value":"accessToken=s%3AeyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlYWNoZXIxIiwiaWF0IjoxNzE2ODA4NzcwLCJleHAiOjE3MTY4MTU5NzB9.k1_1WHSxrSV054bK8zJSLNIhZpNuOJzwPCkokGNEbN0.jFZKFJaZoxCCFgxUTexIOEXcaMZHlfjOje9FogfDKfU; Path=/; Expires=Mon, 27 May 2024 13:19:30 GMT; Secure; SameSite=None"},{"key":"Set-Cookie","value":"refreshToken=s%3AeyJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6InRlYWNoZXIxIiwiaWF0IjoxNzE2ODA4NzcwLCJleHAiOjE3MTgxMDQ3NzB9.J-Acbus1nMfOsnYrpGAxktg_6KC-nHPc0_mXMafKPt8.E3BszKXdkplR6y7gOaGUhVM2ip%2FnYLZiSw%2B%2BqRgm3BQ; Path=/; Expires=Tue, 11 Jun 2024 11:19:30 GMT; Secure; SameSite=None"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::x96hh-1716808769527-f563b10be871"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"7ff50f8a-83cd-460a-b35a-606891e73c23"}],"id":"fed4c9b3-70f1-4af3-baeb-0d0e96bf7791","description":"<p>The <code>/user/login/</code> endpoints let you login an existing account or create a new one.</p>\n","auth":{"type":"noauth","isInherited":false},"event":[{"listen":"prerequest","script":{"id":"7148765a-433e-4320-8ec0-d3d030d50be4","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"81b2510f-fec2-4c83-abee-ad1286a42ed4","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"fed4c9b3-70f1-4af3-baeb-0d0e96bf7791"},{"name":"assignments","item":[{"name":"Create assignment","event":[{"listen":"test","script":{"id":"d0a3813c-836c-43ce-ad6a-f134c586cb75","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"2e906f5a-bcc0-440c-843a-a487e77f6764","exec":[""],"type":"text/javascript","packages":{}}}],"id":"9de7f62f-23a0-4153-bf71-565643f88b42","request":{"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\":\"Assignment title 5\",\n    \"description\": \"Assignment description 5\",\n    \"dueDate\": \"2024-05-26\"\n}"},"url":"https://playpower-backend.vercel.app/api/assignment/new","description":"<p>Create a assignment for students. Only teacher account can use this route. Request body contains</p>\n<ul>\n<li><p>title - a string value containing title of the assignment</p>\n</li>\n<li><p>description - a string value containing description of the assignment</p>\n</li>\n<li><p>dueDate - a string value should be a valid date string representing due date of the assignment</p>\n</li>\n</ul>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","name":"assignments","type":"folder"}},"urlObject":{"protocol":"https","path":["api","assignment","new"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"34746d4c-543d-4015-98eb-5434b45e17b5","name":"successful response","originalRequest":{"method":"POST","header":[{"key":"Content-Type","value":"text/plain"}],"body":{"mode":"raw","raw":"{\n    \"title\":\"Assignment title\",\n    \"description\": \"Assignment description\",\n    \"dueDate\": \"2024-05-26\"\n}","options":{"raw":{"language":"text"}}},"url":"https://playpower-backend.vercel.app/api/assignment/new"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"21"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 11:47:46 GMT"},{"key":"Etag","value":"W/\"15-ga8EF/lp+ThIsc8w/OHbk4hPrME\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::ltsqv-1716810463079-b1454260dfea"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"9de7f62f-23a0-4153-bf71-565643f88b42"},{"name":"get all assignments","event":[{"listen":"test","script":{"id":"207a6a81-5eea-499d-9bff-a5f021b04060","exec":[""],"type":"text/javascript","packages":{}}}],"id":"e16209bc-2b33-419c-a41f-53eaf29cbd94","request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"https://playpower-backend.vercel.app/api/assignment/","description":"<p>Gets all assignments uploaded by all teachers.</p>\n","urlObject":{"protocol":"https","path":["api","assignment",""],"host":["playpower-backend","vercel","app"],"query":[{"disabled":true,"key":"","value":""}],"variable":[]}},"response":[{"id":"a62f7606-b1b5-4495-b58a-0b3e19fef498","name":"successful response","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://playpower-backend.vercel.app/api/assignment/","protocol":"https","host":["playpower-backend","vercel","app"],"path":["api","assignment",""],"query":[{"key":"","value":"","disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Age","value":"0"},{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Encoding","value":"br"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 12:23:50 GMT"},{"key":"Etag","value":"W/\"789-mYIh+Ge2kIP7dCiMOeDqqa677cQ\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::6p2kc-1716812629163-40f6be17259f"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": 1,\n        \"title\": \"Assignment title\",\n        \"description\": \"Assignment description\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T11:47:46.075Z\",\n        \"updatedAt\": \"2024-05-27T11:47:46.075Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 2,\n        \"title\": \"Assignment title 1\",\n        \"description\": \"Assignment description 1\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:14:44.905Z\",\n        \"updatedAt\": \"2024-05-27T12:14:44.905Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 3,\n        \"title\": \"Assignment title 2\",\n        \"description\": \"Assignment description 2\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:15:29.810Z\",\n        \"updatedAt\": \"2024-05-27T12:15:29.810Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 4,\n        \"title\": \"Assignment title 3\",\n        \"description\": \"Assignment description 3\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:16:04.744Z\",\n        \"updatedAt\": \"2024-05-27T12:16:04.744Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 5,\n        \"title\": \"Assignment title 3\",\n        \"description\": \"Assignment description 3\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:16:48.269Z\",\n        \"updatedAt\": \"2024-05-27T12:16:48.269Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 6,\n        \"title\": \"Assignment title 4\",\n        \"description\": \"Assignment description 4\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:17:19.678Z\",\n        \"updatedAt\": \"2024-05-27T12:17:19.678Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 7,\n        \"title\": \"Assignment title 5\",\n        \"description\": \"Assignment description 5\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:18:08.327Z\",\n        \"updatedAt\": \"2024-05-27T12:18:08.327Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    },\n    {\n        \"id\": 8,\n        \"title\": \"Assignment title\",\n        \"description\": \"Assignment description\",\n        \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n        \"teacherId\": 2,\n        \"createdAt\": \"2024-05-27T12:21:20.091Z\",\n        \"updatedAt\": \"2024-05-27T12:21:20.091Z\",\n        \"teacher\": {\n            \"username\": \"teacher1\"\n        }\n    }\n]"}],"_postman_id":"e16209bc-2b33-419c-a41f-53eaf29cbd94"},{"name":"Delete an assignment","event":[{"listen":"test","script":{"id":"1fc4f773-d1c9-4e44-aa48-bf1821ce0c11","exec":[""],"type":"text/javascript","packages":{}}},{"listen":"prerequest","script":{"id":"d2ee5046-ce03-4b11-8ba1-2a3b1eb5fe8a","exec":[""],"type":"text/javascript","packages":{}}}],"id":"1751c6d0-888a-47a5-9c14-cc24063b02d6","request":{"method":"DELETE","header":[],"url":"https://playpower-backend.vercel.app/api/assignment/3","description":"<p>Delete's the assignment whose id matches with provided one. Only teachers who have created the assignment can delete it.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","name":"assignments","type":"folder"}},"urlObject":{"protocol":"https","path":["api","assignment","3"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"ebb79602-0123-4387-baf6-1e75f16634c6","name":"successful response","originalRequest":{"method":"DELETE","header":[],"url":"https://playpower-backend.vercel.app/api/assignment/3"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"32"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 12:34:30 GMT"},{"key":"Etag","value":"W/\"20-egO5KyOv3QSMD/08f4g7CGYIBGk\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::lr7bd-1716813268383-a295ecb38522"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"assignment deleted\"\n}"}],"_postman_id":"1751c6d0-888a-47a5-9c14-cc24063b02d6"},{"name":"Update an assignment","event":[{"listen":"test","script":{"id":"fc383635-2ae9-44ee-b6a6-91980ed83e1f","exec":[""],"type":"text/javascript","packages":{}}}],"id":"fcc83c36-9e6a-4ce0-8264-986962f6a2ec","request":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\":\"Updated Assignment title 5\",\n    \"description\": \"Updated Assignment description 5\",\n    \"dueDate\": \"2024-05-26\"\n}"},"url":"https://playpower-backend.vercel.app/api/assignment/1","description":"<p>This api endpoint edit's the created assignment with the provided body. Only the teacher who has created the assignment can edit it.</p>\n<p>Here \"1\" represents assignment id.</p>\n<p>Request body contains following fields</p>\n<ul>\n<li><p>title - a string value containing title of the assignment</p>\n</li>\n<li><p>description - a string value containing description of the assignment</p>\n</li>\n<li><p>dueDate - a string value should be a valid date string representing due date of the assignment</p>\n</li>\n</ul>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","name":"assignments","type":"folder"}},"urlObject":{"protocol":"https","path":["api","assignment","1"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"e19ab13f-fa35-439f-988b-8a6ff65ea12e","name":"successful response","originalRequest":{"method":"PATCH","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"title\":\"Updated Assignment title 5\",\n    \"description\": \"Updated Assignment description 5\",\n    \"dueDate\": \"2024-05-26\"\n}"},"url":"https://playpower-backend.vercel.app/api/assignment/1"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"21"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 12:38:51 GMT"},{"key":"Etag","value":"W/\"15-ga8EF/lp+ThIsc8w/OHbk4hPrME\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::zwvf7-1716813530304-0c940c4120aa"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"fcc83c36-9e6a-4ce0-8264-986962f6a2ec"},{"name":"get assignment","id":"65a2a55a-f836-48b0-908c-01fe559044cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://playpower-backend.vercel.app/api/assignment/1","description":"<p>Get's a particular assignment. Here \"1\" represents the assignment id.</p>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","name":"assignments","type":"folder"}},"urlObject":{"protocol":"https","path":["api","assignment","1"],"host":["playpower-backend","vercel","app"],"query":[{"disabled":true,"key":"","value":null}],"variable":[]}},"response":[{"id":"01a07c63-e3ed-4832-bde1-864d4a10a102","name":"successful response","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://playpower-backend.vercel.app/api/assignment/1","protocol":"https","host":["playpower-backend","vercel","app"],"path":["api","assignment","1"],"query":[{"key":"","value":null,"disabled":true}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Age","value":"0"},{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"237"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 12:27:35 GMT"},{"key":"Etag","value":"W/\"ed-EnkAzfb2k0xbavKPsVfgkQj1GqI\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::bdpqh-1716812854923-422638de4a2e"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": 1,\n    \"title\": \"Assignment title\",\n    \"description\": \"Assignment description\",\n    \"dueDate\": \"2024-05-26T00:00:00.000Z\",\n    \"teacherId\": 2,\n    \"createdAt\": \"2024-05-27T11:47:46.075Z\",\n    \"updatedAt\": \"2024-05-27T11:47:46.075Z\",\n    \"teacher\": {\n        \"username\": \"teacher1\"\n    }\n}"}],"_postman_id":"65a2a55a-f836-48b0-908c-01fe559044cf"},{"name":"grade assignment","id":"10598535-0433-4a69-9718-fdcc2bc02a23","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"grade\": \"A\",\r\n    \"submitionId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/assignment/1/grade","description":"<p>This api endpoint is used to grade submition of students. Only the teacher who has created the assignment can grade the submitions for that assignment.</p>\n<p>Request Body contains following fields:</p>\n<ul>\n<li><p>grade - a string value, representing grade of the submition</p>\n</li>\n<li><p>submitionId - a number representing id of the submition</p>\n</li>\n</ul>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","name":"assignments","type":"folder"}},"urlObject":{"protocol":"https","path":["api","assignment","1","grade"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"29709215-2ca9-48be-8c3c-78f4cd94ae27","name":"successful response","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\r\n    \"grade\": \"A\",\r\n    \"submitionId\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/assignment/1/grade"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"21"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 12:53:04 GMT"},{"key":"Etag","value":"W/\"15-ga8EF/lp+ThIsc8w/OHbk4hPrME\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::7qhht-1716814380298-6c58d4ec96ff"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"10598535-0433-4a69-9718-fdcc2bc02a23"},{"name":"submit assignment","id":"7b84c10c-39af-4ec0-bc92-04a921dc8e92","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"content\": \"Assignment submition by student sending the request\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/assignment/1/submit","description":"<p>This api endpoint is used by students to submit their solution or answer for the assignment. A particular student can submit an assignment at most once.</p>\n<p>Request body contains following fields</p>\n<ul>\n<li>content - a string value representing the answer of an assignment submitted by the user sending the request.</li>\n</ul>\n","auth":{"type":"noauth","isInherited":true,"source":{"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","name":"assignments","type":"folder"}},"urlObject":{"protocol":"https","path":["api","assignment","1","submit"],"host":["playpower-backend","vercel","app"],"query":[],"variable":[]}},"response":[{"id":"d8c4f608-bc72-4222-848d-e27167aab810","name":"successful response","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"content\": \"Assignment submition by student sending the request\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://playpower-backend.vercel.app/api/assignment/1/submit"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Cache-Control","value":"public, max-age=0, must-revalidate"},{"key":"Connection","value":"keep-alive"},{"key":"Content-Length","value":"21"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Mon, 27 May 2024 12:52:20 GMT"},{"key":"Etag","value":"W/\"15-ga8EF/lp+ThIsc8w/OHbk4hPrME\""},{"key":"Server","value":"Vercel"},{"key":"Strict-Transport-Security","value":"max-age=63072000; includeSubDomains; preload"},{"key":"X-Powered-By","value":"Express"},{"key":"X-Vercel-Cache","value":"MISS"},{"key":"X-Vercel-Id","value":"bom1::iad1::ltsqv-1716814336444-d31f3e91169c"}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"success\"\n}"}],"_postman_id":"7b84c10c-39af-4ec0-bc92-04a921dc8e92"}],"id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9","description":"<p>The <code>/assignment/</code> endpoints let you manage assignments posted by teachers and solutions submited by students.</p>\n","auth":{"type":"noauth","isInherited":false},"event":[{"listen":"prerequest","script":{"id":"0e53f3f7-cd31-4d14-a1a2-c277783032bd","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"374139f3-b2bf-4eb5-a0fe-51c5d466f502","type":"text/javascript","packages":{},"exec":[""]}}],"_postman_id":"5b7220c2-ad9d-43df-955c-d5f7dbab90d9"}],"event":[{"listen":"prerequest","script":{"id":"449ea152-6c0d-409b-83c2-209214e604ff","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"816d471a-a1d9-4e2e-9c35-46d4fb6b21a1","type":"text/javascript","exec":[""]}}],"variable":[{"key":"baseUrl","value":"https://playpower-backend.vercel.app"}]}