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

The following URL structure exists for this controller:

api/Courses/{courseId : int}/Files/{action}/{fileId : optional}

The following calls are currently available for the Entities controller:

1. GET: /api/Files/All

  • Description: Retrieves a list of all available files.
  • Response Format: JSON of IEnumerable<FileModel>
  • Permissions: CanSeeAllFiles

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

  • Description: Retrieves a list of all available files for this course.
  • Response Format: JSON of IEnumerable<FileModel>
  • Permissions: CanSeeFiles

3. GET: /api/Courses/{courseId : int}/Files/Get/{fileId : int}

  • Description: Retrieves the details of a particular file.
  • Response Format: JSON of FileModel
  • Permissions: CanSeeFiles

4. POST: /api/Courses/{courseId : int}/Files/Add

  • Description: Add a new file.
  • Response Format: JSON of the added FileModel
  • Parameters: {file} of type FileModel (JSON in the body of the message)
  • Permissions: CanCreateFiles

5. PUT: /api/Courses/{courseId : int}/Files/Update/{fileId : int}

  • Description: Update an existing file.
  • Response Format: JSON of the updated FileModel
  • Parameters: {file} of type FileModel (JSON in the body of the message)
  • Permissions: CanUpdateFiles

6. DELETE: /api/Courses/{courseId : int}/Files/Delete/{fileId : int}

  • Description: Delete an existing file.
  • Response Format: HttpStatusCode
  • Permissions: CanDeleteFiles

Clone this wiki locally