{"info":{"_postman_id":"898e2366-6b82-41c3-97d6-f0ffc06a1599","name":"L2-B2-assignment-4","description":"<html><head></head><body><p>StartFragmentObjective: Develop a Node.js Express application with TypeScript as the programming language, integrating MongoDB with Mongoose for course review management. Here data integrity is ensured through validation using Zod. This application is developed using Node.js, Express, MongoDB, and TypeScript.EndFragment</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"158106","collectionId":"898e2366-6b82-41c3-97d6-f0ffc06a1599","publishedId":"2s9YsDkF4U","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2023-12-31T01:55:34.000Z"},"item":[{"name":"Users","item":[{"name":"Create a admin","id":"829da62d-2de9-4894-9b02-162f70a91da6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"faria\",\r\n    \"password\": \"12345678\",\r\n    \"email\": \"fariarahman.tora@gmail.com\",\r\n    \"role\": \"admin\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/auth/register","urlObject":{"path":["auth","register"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"829da62d-2de9-4894-9b02-162f70a91da6"},{"name":"Create a Student","id":"1d0093ba-c7c6-43e8-babf-c10be17809cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJBLTAwMDEiLCJyb2xlIjoiYWRtaW4iLCJpYXQiOjE3MDM4NjMwODEsImV4cCI6MTcwMzk0OTQ4MX0.RfwpeuIQIW7i9Mlq_vtL7p3iJfIQtlmAQrYHbXL0PIQ","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"aniba\",\r\n    \"password\": \"12345678\",\r\n    \"email\": \"aniba.iyana@gmail.com\",\r\n    \"role\": \"user\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/auth/register","urlObject":{"path":["auth","register"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"1d0093ba-c7c6-43e8-babf-c10be17809cf"}],"id":"9e7d4dd3-bf68-4e89-868a-ad0c2c79627c","_postman_id":"9e7d4dd3-bf68-4e89-868a-ad0c2c79627c","description":""},{"name":"Auth","item":[{"name":"admin Login","id":"19e1220a-3a09-4215-a9c5-140ceb358067","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"riasat\",\r\n    \"password\": \"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/auth/login","urlObject":{"path":["auth","login"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"19e1220a-3a09-4215-a9c5-140ceb358067"},{"name":"user login","id":"7bf8a39b-b4d8-4e9d-a38c-6f70e12a7f8c","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"username\": \"aniba\",\r\n    \"password\": \"admin123\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/auth/login","urlObject":{"path":["auth","login"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"7bf8a39b-b4d8-4e9d-a38c-6f70e12a7f8c"},{"name":"change password","id":"5b144495-b186-4dac-aeed-8a0c1f2aa8cc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NTkwZDZhYmY3NDc5YTMyMTM2YzFjMmMiLCJyb2xlIjoidXNlciIsImVtYWlsIjoiYW5pYmEuaXlhbmFAZ21haWwuY29tIiwiaWF0IjoxNzAzOTkyMDg1LCJleHAiOjE3MDQwNzg0ODV9.lQliAIbc5JCJcmJcLUe8sZ44V7enP9TdX-afm_pDoJA","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"newPassword\": \"user123\",\r\n    \"oldPassword\": \"12345678\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/auth/change-password","urlObject":{"path":["auth","change-password"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5b144495-b186-4dac-aeed-8a0c1f2aa8cc"}],"id":"439ebbe9-c624-4cc7-aebb-50f153bfa797","_postman_id":"439ebbe9-c624-4cc7-aebb-50f153bfa797","description":""},{"name":"Review","item":[{"name":"Create Review for a course","id":"66ee134a-7b78-49af-b4b7-35637248574a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NTkwNTk3ZTg4MzUzMTE2MmY5ZGFkYTYiLCJyb2xlIjoiYWRtaW4iLCJlbWFpbCI6InJpYXNhdHJhaWhhbkBnbWFpbC5jb20iLCJpYXQiOjE3MDM5Nzk3MzksImV4cCI6MTcwNDA2NjEzOX0.T6iZ2L-Gpe_oCVCFYZ9ZxcPnZk5KdbaxkGoBRf8NWMw","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"courseId\": \"6590ab543c0eb062ef506afa\",\r\n    \"rating\": 5,\r\n    \"review\": \"Well structured\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/reviews","urlObject":{"path":["reviews"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"66ee134a-7b78-49af-b4b7-35637248574a"}],"id":"de85d280-103a-401d-9bd5-7ff22ba95f4f","_postman_id":"de85d280-103a-401d-9bd5-7ff22ba95f4f","description":""},{"name":"Category","item":[{"name":"Create Category","id":"4fdec725-454d-4f65-a566-b262a68b7810","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NTkwNTk3ZTg4MzUzMTE2MmY5ZGFkYTYiLCJyb2xlIjoiYWRtaW4iLCJlbWFpbCI6InJpYXNhdHJhaWhhbkBnbWFpbC5jb20iLCJpYXQiOjE3MDM5Nzk3MzksImV4cCI6MTcwNDA2NjEzOX0.T6iZ2L-Gpe_oCVCFYZ9ZxcPnZk5KdbaxkGoBRf8NWMw","type":"text"}],"body":{"mode":"raw","raw":"{\r\n  \"name\": \"networking\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/categories","urlObject":{"path":["categories"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"4fdec725-454d-4f65-a566-b262a68b7810"},{"name":"Get All","id":"02c21eec-d1f0-4275-a9c9-02c39f00d79b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{l2b2a3}}/categories","urlObject":{"path":["categories"],"host":["{{l2b2a3}}"],"query":[{"disabled":true,"key":"page","value":"1"},{"disabled":true,"key":"limit","value":"2"},{"disabled":true,"key":"searchTerm","value":"01"},{"disabled":true,"key":"code","value":"01"},{"disabled":true,"key":"year","value":"2023"},{"disabled":true,"key":"startMonth","value":"January"}],"variable":[]}},"response":[],"_postman_id":"02c21eec-d1f0-4275-a9c9-02c39f00d79b"}],"id":"18cf5d31-6795-4aaa-aaf6-e56792f0c93c","_postman_id":"18cf5d31-6795-4aaa-aaf6-e56792f0c93c","description":""},{"name":"Course","item":[{"name":"Create Course","id":"36d19ce0-6ebe-4f30-aae9-1e5da0bcf547","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NTkwNTk3ZTg4MzUzMTE2MmY5ZGFkYTYiLCJyb2xlIjoiYWRtaW4iLCJlbWFpbCI6InJpYXNhdHJhaWhhbkBnbWFpbC5jb20iLCJpYXQiOjE3MDM5Nzk3MzksImV4cCI6MTcwNDA2NjEzOX0.T6iZ2L-Gpe_oCVCFYZ9ZxcPnZk5KdbaxkGoBRf8NWMw","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"title\": \"C Programming\",\r\n    \"instructor\": \"Mr. Rjan roe\",\r\n    \"categoryId\": \"65888af9e485d5fb7d36ce21\",\r\n    \"price\": 89.99,\r\n    \"tags\": [\r\n        {\r\n            \"name\": \"Programming\",\r\n            \"isDeleted\": false\r\n        },\r\n        {\r\n            \"name\": \"Mern\",\r\n            \"isDeleted\": false\r\n        }\r\n    ],\r\n    \"startDate\": \"2023-01-15\",\r\n    \"endDate\":\"2023-03-14\",\r\n    \"language\": \"French\",\r\n    \"provider\": \"C Academy\",\r\n    \"details\": {\r\n        \"level\": \"Beginner\",\r\n        \"description\": \"Detailed description of the course\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/course","urlObject":{"path":["course"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"36d19ce0-6ebe-4f30-aae9-1e5da0bcf547"},{"name":"Get All","id":"d9828605-3038-4a36-a9aa-bfc2517c3756","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{l2b2a3}}/courses","urlObject":{"path":["courses"],"host":["{{l2b2a3}}"],"query":[{"disabled":true,"key":"searchTerm","value":"01"},{"disabled":true,"key":"code","value":"01"},{"disabled":true,"key":"year","value":"2023"},{"disabled":true,"key":"startMonth","value":"January"}],"variable":[]}},"response":[],"_postman_id":"d9828605-3038-4a36-a9aa-bfc2517c3756"},{"name":"Get Course with Reviews","id":"33de329e-67e8-4788-bbcc-5f75357ff761","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{l2b2a3}}/courses/6590aa673c0eb062ef506af0/reviews","urlObject":{"path":["courses","6590aa673c0eb062ef506af0","reviews"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"33de329e-67e8-4788-bbcc-5f75357ff761"},{"name":"best course","id":"5fe9f0e1-7ef0-4eeb-9533-f03152321752","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"{{l2b2a3}}/course/best","urlObject":{"path":["course","best"],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"5fe9f0e1-7ef0-4eeb-9533-f03152321752"},{"name":"Update Data by ID","id":"f12d66c2-c8df-42c8-a572-cf08df3b6cfd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PUT","header":[{"key":"Authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2NTkwNTk3ZTg4MzUzMTE2MmY5ZGFkYTYiLCJyb2xlIjoiYWRtaW4iLCJlbWFpbCI6InJpYXNhdHJhaWhhbkBnbWFpbC5jb20iLCJpYXQiOjE3MDM5Nzk3MzksImV4cCI6MTcwNDA2NjEzOX0.T6iZ2L-Gpe_oCVCFYZ9ZxcPnZk5KdbaxkGoBRf8NWMw","type":"text"}],"body":{"mode":"raw","raw":"{\r\n    \"startDate\": \"2023-03-15\",\r\n    \"endDate\": \"2023-06-14\"\r\n}","options":{"raw":{"language":"json"}}},"url":"{{l2b2a3}}/courses/6590aa673c0eb062ef506af0/","urlObject":{"path":["courses","6590aa673c0eb062ef506af0",""],"host":["{{l2b2a3}}"],"query":[],"variable":[]}},"response":[],"_postman_id":"f12d66c2-c8df-42c8-a572-cf08df3b6cfd"}],"id":"a810ccbb-0e6f-455e-a675-93d14b98240f","_postman_id":"a810ccbb-0e6f-455e-a675-93d14b98240f","description":""}],"event":[{"listen":"prerequest","script":{"id":"3373878c-8df7-4282-a248-d9af50046516","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"76538690-b2bc-4463-b63d-24f5f0574d30","type":"text/javascript","exec":[""]}}],"variable":[{"key":"URL","value":"http://localhost:5000/api/v1","type":"string"}]}