| | 105 | === !Courses/Departments === |
| | 106 | |
| | 107 | ||POST||/v1/departments/{department_id}/courses/{course_id}||add a course to a department|| |
| | 108 | || ||parameter||DEPARTMENT_ID|| |
| | 109 | || ||parameter||COURSE_ID|| |
| | 110 | || ||status (success)||HTTP/1.1 201 Created|| |
| | 111 | || ||output (success)||{"course_id":"COURSE_ID", "department_id":"DEPARTMENT_ID"}|| |
| | 112 | || ||status (failure)||HTTP/1.1 500 Internal Server Error|| |
| | 113 | || ||output (failure)||none|| |
| | 114 | ||DELETE||/v1/departments/{department_id}/courses/{course_id}||delete a course from a department|| |
| | 115 | || ||parameter||DEPARTMENT_ID|| |
| | 116 | || ||parameter||COURSE_ID|| |
| | 117 | || ||status (success)||HTTP/1.1 204 No Content|| |
| | 118 | || ||output (success)||none|| |
| | 119 | || ||status (failure)||HTTP/1.1 500 Internal Server Error|| |
| | 120 | || ||output (failure)||none|| |
| | 121 | |
| | 122 | === Departments === |
| | 123 | |
| | 124 | ||GET||v1/departments||get a list of departments the user has access to|| |
| | 125 | || ||parameter||none|| |
| | 126 | || ||status (success)||HTTP/1.1 200 OK|| |
| | 127 | || ||output (success)||[{"id":"DEPT_ID0","name":"DEPT_NAME0"},{"id":"DEPT_ID1","name":"DEPT_NAME1"}]|| |
| | 128 | || ||status (failure)||HTTP/1.1 404 Not Found|| |
| | 129 | || ||output (failure)||none|| |
| | 130 | ||GET||v1/departments/{department_id}||gets a list of courses that belongs to the department with DEPARTMENT_ID|| |
| | 131 | || ||parameter||DEPARTMENT_ID|| |
| | 132 | || ||status (success)||HTTP/1.1 200 OK|| |
| | 133 | || ||output (success)||[{"id":"COURSE0_ID","course":"COURSE0_CODE","title":"COURSE0_TITLE"},{"id":"COURSE1_ID","course":"COURSE1_CODE","title":"COURSE1_TITLE"}]|| |
| | 134 | || ||status (failure)||HTTP/1.1 404 Not Found|| |
| | 135 | || ||output (failure)||none|| |
| | 136 | |