Changes between Version 14 and Version 15 of api_v1


Ignore:
Timestamp:
2012-09-30T07:20:04Z (12 years ago)
Author:
Pan Luo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • api_v1

    v14 v15  
    1313|| ||parameter||none||
    1414|| ||input||none||
    15 || ||status (success)||HTTP/1.0 200 OK||
     15|| ||status (success)||HTTP/1.1 200 OK||
    1616|| ||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.0 404 Not Found||
     17|| ||status (failure)||HTTP/1.1 404 Not Found||
    1818|| ||output (failure)||null||
    1919||GET||/v1/users/{id}||get a user with id||
    2020|| ||parameter||USER_ID||
    2121|| ||input||none||
    22 || ||status (success)||HTTP/1.0 200 OK||
     22|| ||status (success)||HTTP/1.1 200 OK||
    2323|| ||output (success)||[{"id":"USER0_ID","role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]||
    24 || ||status (failure)||HTTP/1.0 404 Not Found||
     24|| ||status (failure)||HTTP/1.1 404 Not Found||
    2525|| ||output (failure)||null||
    2626||POST||/v1/users||create a user||
    2727|| ||parameter||none||
    2828|| ||input||[{"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]||
    29 || ||status (success)||HTTP/1.0 201 CREATED||
     29|| ||status (success)||HTTP/1.1 201 CREATED||
    3030|| ||output (success)||[{"id":"USER_ID","role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]||
    31 || ||status (failure)||HTTP/1.0 500 Internal Server Error||
     31|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    3232|| ||output (failure)||null||
    3333||POST||/v1/users||create users||
    3434|| ||parameter||none||
    3535|| ||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.0 201 CREATED||
     36|| ||status (success)||HTTP/1.1 201 CREATED||
    3737|| ||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.0 500 Internal Server Error||
     38|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    3939|| ||output (failure)||null||
    4040||DELETE||/v1/users/{id}||remove a user with id||
    4141|| ||parameter||USER_ID||
    4242|| ||input||none||
    43 || ||status (success)||HTTP/1.0 204 No Content||
     43|| ||status (success)||HTTP/1.1 204 No Content||
    4444|| ||output (success)||null||
    45 || ||status (failure)||HTTP/1.0 500 Internal Server Error||
     45|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    4646|| ||output (failure)||null||
    4747||PUT||/v1/users/{id}||update a user with id||
    4848|| ||parameter||COURSE_ID||
    4949|| ||input||[{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}]||
    50 || ||status (success)||HTTP/1.0 200 OK||
     50|| ||status (success)||HTTP/1.1 200 OK||
    5151|| ||output (success)||[{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}]||
    52 || ||status (failure)||HTTP/1.0 500 Internal Server Error||
     52|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    5353|| ||output (failure)||null||
    5454
     
    5858|| ||parameter||none||
    5959|| ||input||none||
    60 || ||status (success)||HTTP/1.0 200 OK||
     60|| ||status (success)||HTTP/1.1 200 OK||
    6161|| ||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.0 404 Not Found||
     62|| ||status (failure)||HTTP/1.1 404 Not Found||
    6363|| ||output (failure)||No courses can be found||
    6464||GET||/v1/courses/{id}||get a course with id||
    6565|| ||parameter||COURSE_ID||
    6666|| ||input||none||
    67 || ||status (success)||HTTP/1.0 200 OK||
     67|| ||status (success)||HTTP/1.1 200 OK||
    6868|| ||output (success)||{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}||
    69 || ||status (failure)||HTTP/1.0 404 Not Found||
     69|| ||status (failure)||HTTP/1.1 404 Not Found||
    7070|| ||status (failure)||No course with id COURSE_ID can be found||
    7171||POST||/v1/courses||create a course||
    7272|| ||parameter||none||
    7373|| ||input||{"Course":{"course":"COURSE_CODE","title":"COURSE_TITLE"},"Department":{"Department":[DEPARTMENT_ID]}}||
    74 || ||status (success)||HTTP/1.0 201 Created||
     74|| ||status (success)||HTTP/1.1 201 Created||
    7575|| ||output (success)||COURSE_ID||
    76 || ||status (failure)||HTTP/1.0 500 Internal Server Error||
     76|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    7777|| ||output (failure)||Error: the course was not added||
    7878||DELETE||/v1/courses/{id}||remove a course with id||
    7979|| ||parameter||COURSE_ID||
    8080|| ||input||none||
    81 || ||status (success)||HTTP/1.0 204 No Content||
     81|| ||status (success)||HTTP/1.1 204 No Content||
    8282|| ||output (success)||COURSE_ID||
    83 || ||status (failure)||HTTP/1.0 500 Internal Server Error||
     83|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    8484|| ||output (failure)||Error: the course was not deleted||
    8585||PUT||/v1/courses/{id}||update a course with id||
    8686|| ||parameter||none||
    8787|| ||input||{"Course":{"id":"COURSE_ID","course":"COURSE_CODE","title":"COURSE_TITLE"}}||
    88 || ||status (success)||HTTP/1.0 200 OK||
     88|| ||status (success)||HTTP/1.1 200 OK||
    8989|| ||output (success)||COURSE_ID||
    90 || ||status (failure)||HTTP/1.0 500 Internal Server Error||
     90|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    9191|| ||output (failure)||Error: the course was not edited||
    9292
     
    9595||GET||/v1/courses/{course_id}/users||get a list of users associated within the course {course_id}||
    9696||POST||/v1/courses{course_id}/users||associate users to the course by {course_id}||
    97 ||DELETE||/v1/courses/{course_id}/users||remove users from the course||
     97||DELETE||/v1/courses/{course_id}/users||remove a user from the course||
    9898|| ||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.0 204 No Content||
    101 || ||output (success)||COURSE_ID||
    102 || ||status (failure)||HTTP/1.0 500 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||
    103103|| ||output (failure)|| none ||
    104104
     
    115115||GET||/v1/groups/{group_id}/users||get a list of users associated within the group {group_id}||
    116116||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 ||
    118124
    119125=== Grades ===