Changes between Version 17 and Version 18 of api_v1


Ignore:
Timestamp:
2012-10-02T23:04:35Z (12 years ago)
Author:
michael
Comment:

group api

Legend:

Unmodified
Added
Removed
Modified
  • api_v1

    v17 v18  
    2121|| ||input||none||
    2222|| ||status (success)||HTTP/1.1 200 OK||
    23 || ||output (success)||[{"id":"USER0_ID","role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]||
     23|| ||output (success)||{"id":"USER0_ID","role_id":"ROLE_ID","username":"USERNAME0","last_name":"LAST_NAME","first_name":"FIRST_NAME"}||
    2424|| ||status (failure)||HTTP/1.1 404 Not Found||
    2525|| ||output (failure)||none||
    2626||POST||/v1/users||create a user||
    2727|| ||parameter||none||
    28 || ||input||[{"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]||
     28|| ||input||{"role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}||
    2929|| ||status (success)||HTTP/1.1 201 CREATED||
    30 || ||output (success)||[{"id":"USER_ID","role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}]||
     30|| ||output (success)||{"id":"USER_ID","role_id":"ROLE_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME"}||
    3131|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    3232|| ||output (failure)||none||
    3333||POST||/v1/users||create users||
    3434|| ||parameter||none||
    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"}]||
     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"}||
    3636|| ||status (success)||HTTP/1.1 201 CREATED||
    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"}]||
     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"}||
    3838|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    3939|| ||output (failure)||none||
     
    4747||PUT||/v1/users/{id}||update a user with id||
    4848|| ||parameter||COURSE_ID||
    49 || ||input||[{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}]||
     49|| ||input||{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}||
    5050|| ||status (success)||HTTP/1.1 200 OK||
    51 || ||output (success)||[{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}]||
     51|| ||output (success)||{"id":"USER_ID","username":"USERNAME","last_name":"LAST_NAME","first_name":"FIRST_NAME","role_id":"ROLE_ID"}||
    5252|| ||status (failure)||HTTP/1.1 500 Internal Server Error||
    5353|| ||output (failure)||none||
     
    109109|| ||input||none||
    110110|| ||status (success)||HTTP/1.0 200 OK||
    111 || ||output (success)||[{"id":"GROUP_IDO","group_num":"GROUP_NUM0","group_name":"GROUP_NAME0","course_id":"COURSE_ID"},{"id":"GROUP_ID1","group_num":"GROUP_NUM1","group_name":"GROUP_NAME1","course_id":"COURSE_ID"}]
     111|| ||output (success)||[{"id":"GROUP_IDO","group_num":"GROUP_NUM0","group_name":"GROUP_NAME0","course_id":"COURSE_ID"},{"id":"GROUP_ID1","group_num":"GROUP_NUM1","group_name":"GROUP_NAME1","course_id":"COURSE_ID"}]||
    112112|| ||status (failure)||HTTP/1.0 404 Not Found||
    113113|| ||output (failure)||none||
    114114||GET||/v1/courses/{course_id}/groups/id||get a group in course by group id, course_id will be ignored||
    115 ||POST||/v1/courses{course_id}/groups||create a group in course {course_id}||
     115|| ||parameter||COURSE_ID||
     116|| ||parameter||GROUP_ID||
     117|| ||status (success)||HTTP/1.0 200 OK||
     118|| ||output (success)||{"id":"GROUP_ID","group_num":"GROUP_NUM","group_name":"GROUP_NAME","course_id":"COURSE_ID"}||
     119|| ||status (failure)||HTTP/1.0 404 Not Found||
     120|| ||output (failure)||none||
     121||POST||/v1/courses/{course_id}/groups||create a group in course {course_id}||
     122|| ||parameter||COURSE_ID||
     123|| ||input||{"group_num":"GROUP_NUM","group_name":"GROUP_NAME","course_id":"COURSE_ID"}||
     124|| ||status (success)||HTTP/1.0 201 Created||
     125|| ||output (success)||{"id":"GROUP_ID","group_num":"GROUP_NUM","group_name":"GROUP_NAME","course_id":"COURSE_ID"}||
     126|| ||status (failure)||HTTP/1.0 500 Internal Server Error||
     127|| ||output (failure)||none||
    116128||DELETE||/v1/courses/{course_id}/groups/{id}||remove a group  in course by group id, course_id will be ignored||
     129|| ||parameter||COURSE_ID||
     130|| ||parameter||GROUP_ID||
     131|| ||status (success)||HTTP/1.0 204 No Content||
     132|| ||output (success)||none||
     133|| ||status (failure)||HTTP/1.0 500 Internal Server Error||
     134|| ||output (failure)||none||
    117135||PUT||/v1/courses/{course_id}/groups/{id}||update a group in course by group id, course_id will be ignored||
     136|| ||parameter||COURSE_ID||
     137|| ||parameter||GROUP_ID||
     138|| ||input||{"id":"GROUP_ID","course_id":"COURSE_ID","group_num":"GROUP_NUM","group_name":"GROUP_NAME"}||
     139|| ||status (success)||HTTP/1.0 200 OK||
     140|| ||output (success)||{"id":"GROUP_ID","group_num":"GROUP_NUM","group_name":"GROUP_NAME","course_id":"COURSE_ID"}||
     141|| ||status (failure)||HTTP/1.0 200 OK||
     142|| ||output (failure)||none||
    118143
    119144=== !Groups/Users ===