Last active
December 5, 2018 17:56
-
-
Save kizzlebot/e7f81a141b5fee615fef0fa3f9969ceb to your computer and use it in GitHub Desktop.
Postman export for Simulation EDU Backend API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"info": { | |
"_postman_id": "a038074d-58f4-4406-9352-df786f58c862", | |
"name": "simedu", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" | |
}, | |
"item": [ | |
{ | |
"name": "password-reset", | |
"item": [ | |
{ | |
"name": "request password reset", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
}, | |
{ | |
"key": "referer", | |
"value": "http://localhost:3000", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"email\": \"james@e2gens.com\"\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/password-reset", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"password-reset" | |
] | |
}, | |
"description": "Request password reset request email for given email address" | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Verify password reset token", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/password-reset/4111d6fb06171afd79f4659717662064a7923d45/verify", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"password-reset", | |
"4111d6fb06171afd79f4659717662064a7923d45", | |
"verify" | |
] | |
}, | |
"description": "Check if password reset token has expired" | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Set new password", | |
"request": { | |
"method": "PUT", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"password\": \"test1111\",\n\t\"passwordConfirm\": \"test1111\"\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/password-reset/4fd60c10b2377c8e6bbe81fc08aedf6941d740f5", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"password-reset", | |
"4fd60c10b2377c8e6bbe81fc08aedf6941d740f5" | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "register user (student/teacher/admin)", | |
"item": [ | |
{ | |
"name": "Create Admin", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"username\": \"admin\",\n\t\"password\": \"test123\",\n\t\"firstName\": \"Jesus\",\n\t\"lastName\": \"Christ\",\n\t\"email\": \"test@gmail.com\"\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/register/admin", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"register", | |
"admin" | |
] | |
}, | |
"description": "Must be logged in as admin user OR start BE w/ NODE_ENV=development" | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Create Teacher", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"name": "Content-Type", | |
"value": "application/json", | |
"type": "text" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"username\": \"teacher1test2\",\n\t\"password\": \"test123\",\n\t\"firstName\": \"Jesus\",\n\t\"lastName\": \"Christ\",\n\t\"email\": \"test@gmail.com\",\n\t\"classId\": \"5bb80bda0e6e8668eb6cf93a\"\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/register/teacher", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"register", | |
"teacher" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "create student", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "", | |
"value": "" | |
}, | |
{ | |
"key": "Content-Type", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"username\": \"jamestest3\",\n\t\"password\": \"test123\",\n\t\"firstName\": \"Jesus\",\n\t\"lastName\": \"Christ\",\n\t\"email\": \"james@e2gens.com\",\n\t\"classId\": \"5bb80bda0e6e8668eb6cf93a\"\n}" | |
}, | |
"url": { | |
"raw": "http://localhost:8080/api/users/register", | |
"protocol": "http", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"register" | |
] | |
} | |
}, | |
"response": [] | |
} | |
] | |
}, | |
{ | |
"name": "User login", | |
"request": { | |
"method": "POST", | |
"header": [ | |
{ | |
"key": "", | |
"value": "", | |
"disabled": false | |
}, | |
{ | |
"key": "Content-Type", | |
"value": "application/json", | |
"disabled": false | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"username\": \"admin\",\n\t\"password\": \"test123\"\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/login", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"login" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "get college module answers", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/modules/college?filter", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"modules", | |
"college" | |
], | |
"query": [ | |
{ | |
"key": "filter", | |
"value": null | |
} | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "create classroom", | |
"request": { | |
"method": "POST", | |
"header": [], | |
"body": {}, | |
"url": { | |
"raw": "localhost:8080/api/classrooms", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"classrooms" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "get classrooms", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/classrooms/modules", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"classrooms", | |
"modules" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "get classrooms by id", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/classrooms/5bb80b6fb1e684684b2f5dae", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"classrooms", | |
"5bb80b6fb1e684684b2f5dae" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "get classroom modules", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/classrooms/modules", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"classrooms", | |
"modules" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Get user's college module answers", | |
"request": { | |
"method": "PATCH", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/modules/college", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"modules", | |
"college" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Get a college costs", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/modules/college", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"modules", | |
"college" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Change module selection", | |
"request": { | |
"method": "PATCH", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/json", | |
"disabled": false | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"selected\": true\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/modules/college/929852aa-b9cd-45c2-9453-2bcfcdf39c9a", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"modules", | |
"college", | |
"929852aa-b9cd-45c2-9453-2bcfcdf39c9a" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Update answers to module", | |
"request": { | |
"method": "PATCH", | |
"header": [ | |
{ | |
"key": "Content-Type", | |
"value": "application/json" | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "{\n\t\"collegeId\": \"1111\"\n}" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/modules/college", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"modules", | |
"college" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "get module answers by id", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/classrooms/modules", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"classrooms", | |
"modules" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "fetch colleges", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/colleges", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"colleges" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "check session", | |
"request": { | |
"method": "GET", | |
"header": [ | |
{ | |
"key": "Authorization", | |
"value": "", | |
"disabled": true | |
} | |
], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/session", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"session" | |
] | |
} | |
}, | |
"response": [] | |
}, | |
{ | |
"name": "Logout", | |
"request": { | |
"method": "GET", | |
"header": [], | |
"body": { | |
"mode": "raw", | |
"raw": "" | |
}, | |
"url": { | |
"raw": "localhost:8080/api/users/logout", | |
"host": [ | |
"localhost" | |
], | |
"port": "8080", | |
"path": [ | |
"api", | |
"users", | |
"logout" | |
] | |
}, | |
"description": "Respond w/ message or \n" | |
}, | |
"response": [] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment