Changes between Version 6 and Version 7 of api_v1
- Timestamp:
- 2012-08-29T16:50:23Z (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
api_v1
v6 v7 21 21 || ||parameter||none|| 22 22 || ||input||none|| 23 || ||response||success (200) or could not find (404)|| 24 || ||output||course list (json), or error message|| 23 || ||status (success)||HTTP/1.0 200 OK|| 24 || ||output (success)||[{"id":"COURSE0_ID","course":"COURSE0_CODE","title":"COURSE0_TITLE"},{"id":"COURSE1_ID","course":"COURSE1_CODE","title":"COURSE1_TITLE"}]|| 25 || ||status (failure)||HTTP/1.0 404 Not Found|| 26 || ||output (failure)||No courses can be found|| 25 27 ||GET||/v1/courses/{id}||get a course with id|| 26 || ||parameter|| course id||28 || ||parameter||COURSE_ID|| 27 29 || ||input||none|| 28 || ||response||success (200) or could not find (404)|| 29 || ||output||course (json), or error message|| 30 || ||status (success)||HTTP/1.0 200 OK|| 31 || ||output (success)||{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}|| 32 || ||status (failure)||HTTP/1.0 404 Not Found|| 33 || ||status (failure)||No course with id COURSE_ID can be found|| 30 34 ||POST||/v1/courses||create a course|| 31 35 || ||parameter||none|| 32 36 || ||input||{"Course":{"course":"COURSE_CODE","title":"COURSE_TITLE"},"Department":{"Department":[DEPARTMENT_ID]}}|| 33 || ||response||created (201) or error (500)|| 34 || ||output||id of created course, or error message|| 37 || ||status (success)||HTTP/1.0 201 Created|| 38 || ||output (success)||COURSE_ID|| 39 || ||status (failure)||HTTP/1.0 500 Internal Server Error|| 40 || ||output (failure)||Error: the course was not added|| 35 41 ||DELETE||/v1/courses/{id}||remove a course with id|| 36 || ||parameter|| course id||42 || ||parameter||COURSE_ID|| 37 43 || ||input||none|| 38 || ||response||success (204) or error (500)|| 39 || ||output||id of deleted course, or error message|| 44 || ||status (success)||HTTP/1.0 204 No Content|| 45 || ||output (success)||COURSE_ID|| 46 || ||status (failure)||HTTP/1.0 500 Internal Server Error|| 47 || ||output (failure)||Error: the course was not deleted|| 40 48 ||PUT||/v1/courses/{id}||update a course with id|| 41 49 || ||parameter||none|| 42 50 || ||input||{"Course":{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}}|| 43 || ||response||success (200) or error (500)|| 44 || ||output||id of updated course, or error message|| 51 || ||status (success)||HTTP/1.0 200 OK|| 52 || ||output (success)||COURSE_ID|| 53 || ||status (failure)||HTTP/1.0 500 Internal Server Error|| 54 || ||output (failure)||Error: the course was not edited|| 45 55 46 56 === Groups ===