| 96 | || ||parameter||COURSE_ID|| |
| 97 | || ||input|| none |
| 98 | || ||status (success)||HTTP/1.1 201 Created|| |
| 99 | || ||output (success)||[{"id": "1", "username":"username1", "role_id":1}, {"id": "2", "username":"username2", "role_id":1},{"id": "3", "username":"username3", "role_id":2}]|| |
| 100 | || ||status (failure)||HTTP/1.1 400 Unrecognizable Request|| |
| 101 | || ||output (failure)|| none || |
98 | | || ||input||[{"username":"username1", "role_id":1}, {"username":"username2", "role_id":1},{"username":"username3", "role_id":2}], other fields in request will be ignored|| |
99 | | || ||status (success)||HTTP/1.1 201 Created|| |
100 | | || ||output (success)||[{"username":"username1", "role_id":1}, {"username":"username2", "role_id":1},{"username":"username3", "role_id":2}]|| |
101 | | || ||status (failure)||HTTP/1.1 500 Internal Server Error|| |
102 | | || ||output (failure)|| none || |
| 104 | || ||input||[{"username":"username1", "role_id":5}, {"username":"username2", "role_id":5},{"username":"username3", "role_id":4}], other fields in request will be ignored|| |
| 105 | || ||status (success)||HTTP/1.1 200 OK|| |
| 106 | || ||output (success)||[{"username":"username1", "role_id":5}, {"username":"username2", "role_id":5},{"username":"username3", "role_id":4}]|| |
| 107 | || ||status (failure)||HTTP/1.1 501 Unsupported role for {username}|| |
| 108 | || ||note (failure)|| The role_id was unrecognized, recognized role_ids right now are student (5), tutor (4), and instructor (3) || |
| 109 | || ||status (failure)||HTTP/1.1 501 Fail to enrol ${username}|| |
| 110 | || ||note (failure)|| Tried to save the new enrolments but failed due to a database error. || |
105 | | || ||parameter||USER_ID|| |
106 | | || ||status (success)||HTTP/1.1 204 No Content|| |
107 | | || ||output (success)||none|| |
108 | | || ||status (failure)||HTTP/1.1 500 users were not deleted|| |
109 | | || ||output (failure)|| none || |
| 113 | || ||input||[{"username":"username1", "role_id":5}, {"username":"username2", "role_id":5},{"username":"username3", "role_id":4}], other fields in request will be ignored|| |
| 114 | || ||status (success)||HTTP/1.1 200 OK|| |
| 115 | || ||output (success)||[{"username":"username1", "role_id":5}, {"username":"username2", "role_id":5},{"username":"username3", "role_id":4}]|| |
| 116 | || ||status (failure)||HTTP/1.1 501 Unsupported role for {username}|| |
| 117 | || ||note (failure)|| The role_id was unrecognized, recognized role_ids right now are student (5), tutor (4), and instructor (3) || |
| 118 | || ||status (failure)||HTTP/1.1 501 Fail to drop ${username}|| |
| 119 | || ||note (failure)|| Tried to save the new enrolments but failed due to a database error. || |