Changes between Version 29 and Version 30 of api_v1


Ignore:
Timestamp:
2012-10-25T23:16:48Z (12 years ago)
Author:
michael
Comment:

Match Course/Users to implementation.

Legend:

Unmodified
Added
Removed
Modified
  • api_v1

    v29 v30  
    9494
    9595||GET||/v1/courses/{course_id}/users||get a list of users associated within the course {course_id}||
     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 ||
    96102||POST||/v1/courses{course_id}/users||associate users to the course by {course_id}||
    97103|| ||parameter||COURSE_ID||
    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. ||
    103111||DELETE||/v1/courses/{course_id}/users||remove a user from the course||
    104112|| ||parameter||COURSE_ID||
    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. ||
    110120
    111121=== !Courses/Departments ===