Skip to content
Antonius Cezar Hegyes edited this page Jan 19, 2015 · 12 revisions

The following URL structure exists for this controller:

api/Courses/{courseId}/{controller}/{action}/{courseUserId : optional}

The following calls are currently available for the Courses Users controller:

1. GET: /api/CourseUsers/All

  • Description: Retrieves a list of all existing enrollments in the database.
  • Response Format: JSON of IEnumerable<CourseUser>
  • Permissions: CanSeeAllCourseUsers

2. GET: /api/Courses/{courseId : int}/CourseUsers/All

  • Description: Retrieves a list of all students enrolled in a certain course.
  • Response Format: JSON of IEnumerable<CourseUser>
  • Permissions: None

3. GET: /api/Courses/{courseId : int}/CourseUsers/Get/{courseUserId : int}

  • Description: Retrieves the details of a particular course enrollment.
  • Response Format: JSON of CourseUser
  • Permissions: None

4. GET: /api/Courses/{courseId : int}/CourseUsers/GetEnrollmentGrade/{courseUserId : int}?isPredicted={true/false}

  • Description: Get the predicted or current grade of the enrolled user.
  • Response Format: int
  • Parameters: {isPredicted} of type bool
  • Permissions : CanSeeFinalGrades

5. POST: /api/Courses/{courseId : int}/CourseUsers/Add

  • Description: Add a new course.
  • Response Format: JSON of the added CourseUser
  • Parameters: {courseId} of type int and {courseUser} of type CourseUser (JSON in the body of the message)
  • Permissions: CanAddEnrollment

6. PUT: /api/Courses/{courseId : int}/CourseUsers/Update/{courseUserId : int}

  • Description: Update an existing course enrollment.
  • Response Format: JSON of the updated CourseUser
  • Parameters: {courseId} of type int and {courseId} of type int and {courseUserId} of type int and {courseUser} of type CourseUser
  • Permissions: CanUpdateEnrollment

7. DELETE: /api/Courses/{courseId : int}/CourseUsers/Delete/{courseUserId : int}

  • Description: Delete an existing course enrollment.
  • Response Format: HttpStatusCode
  • Parameters: {courseId} of type int and {courseUserId} of type int
  • Permissions: CanDeleteEnrollment

Clone this wiki locally