Changes between Version 14 and Version 15 of api_v1
- Timestamp:
- 2012-09-30T07:20:04Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
api_v1
v14 v15 13 13 || ||parameter||none|| 14 14 || ||input||none|| 15 || ||status (success)||HTTP/1. 0200 OK||15 || ||status (success)||HTTP/1.1 200 OK|| 16 16 || ||output (success)||[{"id":"USER0_ID","role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"},{"id":"USER1_ID","role_id":"ROLE_ID","username":"USERNAME1","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]|| 17 || ||status (failure)||HTTP/1. 0404 Not Found||17 || ||status (failure)||HTTP/1.1 404 Not Found|| 18 18 || ||output (failure)||null|| 19 19 ||GET||/v1/users/{id}||get a user with id|| 20 20 || ||parameter||USER_ID|| 21 21 || ||input||none|| 22 || ||status (success)||HTTP/1. 0200 OK||22 || ||status (success)||HTTP/1.1 200 OK|| 23 23 || ||output (success)||[{"id":"USER0_ID","role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]|| 24 || ||status (failure)||HTTP/1. 0404 Not Found||24 || ||status (failure)||HTTP/1.1 404 Not Found|| 25 25 || ||output (failure)||null|| 26 26 ||POST||/v1/users||create a user|| 27 27 || ||parameter||none|| 28 28 || ||input||[{"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]|| 29 || ||status (success)||HTTP/1. 0201 CREATED||29 || ||status (success)||HTTP/1.1 201 CREATED|| 30 30 || ||output (success)||[{"id":"USER_ID","role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]|| 31 || ||status (failure)||HTTP/1. 0500 Internal Server Error||31 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 32 32 || ||output (failure)||null|| 33 33 ||POST||/v1/users||create users|| 34 34 || ||parameter||none|| 35 35 || ||input||[{"role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"},{"role_id":"ROLE_ID","username":"USERNAME1","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]|| 36 || ||status (success)||HTTP/1. 0201 CREATED||36 || ||status (success)||HTTP/1.1 201 CREATED|| 37 37 || ||output (success)||[{"id":"USER0_ID","role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"},{"id":"USER1_ID","role_id":"ROLE_ID","username":"USERNAME1","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]|| 38 || ||status (failure)||HTTP/1. 0500 Internal Server Error||38 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 39 39 || ||output (failure)||null|| 40 40 ||DELETE||/v1/users/{id}||remove a user with id|| 41 41 || ||parameter||USER_ID|| 42 42 || ||input||none|| 43 || ||status (success)||HTTP/1. 0204 No Content||43 || ||status (success)||HTTP/1.1 204 No Content|| 44 44 || ||output (success)||null|| 45 || ||status (failure)||HTTP/1. 0500 Internal Server Error||45 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 46 46 || ||output (failure)||null|| 47 47 ||PUT||/v1/users/{id}||update a user with id|| 48 48 || ||parameter||COURSE_ID|| 49 49 || ||input||[{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}]|| 50 || ||status (success)||HTTP/1. 0200 OK||50 || ||status (success)||HTTP/1.1 200 OK|| 51 51 || ||output (success)||[{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}]|| 52 || ||status (failure)||HTTP/1. 0500 Internal Server Error||52 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 53 53 || ||output (failure)||null|| 54 54 … … 58 58 || ||parameter||none|| 59 59 || ||input||none|| 60 || ||status (success)||HTTP/1. 0200 OK||60 || ||status (success)||HTTP/1.1 200 OK|| 61 61 || ||output (success)||[{"id":"COURSE0_ID","course":"COURSE0_CODE","title":"COURSE0_TITLE"},{"id":"COURSE1_ID","course":"COURSE1_CODE","title":"COURSE1_TITLE"}]|| 62 || ||status (failure)||HTTP/1. 0404 Not Found||62 || ||status (failure)||HTTP/1.1 404 Not Found|| 63 63 || ||output (failure)||No courses can be found|| 64 64 ||GET||/v1/courses/{id}||get a course with id|| 65 65 || ||parameter||COURSE_ID|| 66 66 || ||input||none|| 67 || ||status (success)||HTTP/1. 0200 OK||67 || ||status (success)||HTTP/1.1 200 OK|| 68 68 || ||output (success)||{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}|| 69 || ||status (failure)||HTTP/1. 0404 Not Found||69 || ||status (failure)||HTTP/1.1 404 Not Found|| 70 70 || ||status (failure)||No course with id COURSE_ID can be found|| 71 71 ||POST||/v1/courses||create a course|| 72 72 || ||parameter||none|| 73 73 || ||input||{"Course":{"course":"COURSE_CODE","title":"COURSE_TITLE"},"Department":{"Department":[DEPARTMENT_ID]}}|| 74 || ||status (success)||HTTP/1. 0201 Created||74 || ||status (success)||HTTP/1.1 201 Created|| 75 75 || ||output (success)||COURSE_ID|| 76 || ||status (failure)||HTTP/1. 0500 Internal Server Error||76 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 77 77 || ||output (failure)||Error: the course was not added|| 78 78 ||DELETE||/v1/courses/{id}||remove a course with id|| 79 79 || ||parameter||COURSE_ID|| 80 80 || ||input||none|| 81 || ||status (success)||HTTP/1. 0204 No Content||81 || ||status (success)||HTTP/1.1 204 No Content|| 82 82 || ||output (success)||COURSE_ID|| 83 || ||status (failure)||HTTP/1. 0500 Internal Server Error||83 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 84 84 || ||output (failure)||Error: the course was not deleted|| 85 85 ||PUT||/v1/courses/{id}||update a course with id|| 86 86 || ||parameter||none|| 87 87 || ||input||{"Course":{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}}|| 88 || ||status (success)||HTTP/1. 0200 OK||88 || ||status (success)||HTTP/1.1 200 OK|| 89 89 || ||output (success)||COURSE_ID|| 90 || ||status (failure)||HTTP/1. 0500 Internal Server Error||90 || ||status (failure)||HTTP/1.1 500 Internal Server Error|| 91 91 || ||output (failure)||Error: the course was not edited|| 92 92 … … 95 95 ||GET||/v1/courses/{course_id}/users||get a list of users associated within the course {course_id}|| 96 96 ||POST||/v1/courses{course_id}/users||associate users to the course by {course_id}|| 97 ||DELETE||/v1/courses/{course_id}/users||remove usersfrom the course||97 ||DELETE||/v1/courses/{course_id}/users||remove a user from the course|| 98 98 || ||parameter||COURSE_ID|| 99 || || input||none for removing all users or [{"id":1},{"id":2},{"id":3}] for specific users (other fields are ignored)||100 || ||status (success)||HTTP/1. 0204 No Content||101 || ||output (success)|| COURSE_ID||102 || ||status (failure)||HTTP/1. 0500 users were not deleted||99 || ||parameter||USER_ID|| 100 || ||status (success)||HTTP/1.1 204 No Content|| 101 || ||output (success)||none|| 102 || ||status (failure)||HTTP/1.1 500 users were not deleted|| 103 103 || ||output (failure)|| none || 104 104 … … 115 115 ||GET||/v1/groups/{group_id}/users||get a list of users associated within the group {group_id}|| 116 116 ||POST||/v1/groups{group_id}/users||associate users to the group by {group_id}|| 117 ||DELETE||/v1/groups/{group_id}/users||remove users from the group|| 117 ||DELETE||/v1/groups/{group_id}/users/{user_id}||remove a user from the group|| 118 || ||parameter||GROUP_ID|| 119 || ||parameter||USER_ID|| 120 || ||status (success)||HTTP/1.1 204 No Content|| 121 || ||output (success)||none|| 122 || ||status (failure)||HTTP/1.1 500 users were not deleted|| 123 || ||output (failure)|| none || 118 124 119 125 === Grades ===