Skip to content
Antonius Cezar Hegyes edited this page Jan 13, 2015 · 6 revisions

The following URL structure exists for this controller:

api/Courses/{courseId}/Tasks/{action}/{taskId : optional}

The following calls are currently available for the Tasks controller:

1. GET: /api/Tasks/All

  • Description: Retrieves a list of all available tasks.
  • Response Format: JSON of IEnumerable<TaskModel>
  • Permissions: CanSeeAllTasks

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

  • Description: Retrieves a list of all available tasks for a certain course.
  • Response Format: JSON of IEnumerable<TaskModel>
  • Permissions: CanSeeTasks

3. GET: /api/Courses/{courseId : int}/Tasks/Get/{taskId : int}

  • Description: Retrieves the details of a particular task.
  • Response Format: JSON of TaskModel
  • Permissions: CanSeeTasks

4. GET: /api/Courses/{courseId : int}/Tasks/GetGradeComponent/{taskId : int}

5. POST: /api/Courses/{courseId}/Tasks/Add

  • Description: Add a new task.
  • Response Format: JSON of the added TaskModel
  • Parameters: {task} of type TaskModel (JSON in the body of the message)
  • Permissions: CanCreateTasks

6. PUT: /api/Courses/{courseId : int}/Tasks/Update/{taskId : int}

  • Description: Update an existing task.
  • Response Format: JSON of the updated TaskModel
  • Parameters: {task} of type TaskModel (JSON in the body of the message)
  • Permissions: CanUpdateTasks

7. DELETE: /api/Courses/{courseId : int}/Tasks/Delete/{taskId : int}

  • Description: Delete an existing task.
  • Response Format: HttpStatusCode
  • Permissions: CanDeleteTasks

Clone this wiki locally