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

The following URL structure exists for this controller:

api/Courses/{courseId}/Entities/{action}/{entityId : optional}

The following calls are currently available for the Entities controller:

1. GET: /api/Entities/All

  • Description: Retrieves a list of all available entities.
  • Response Format: JSON of IEnumerable<EntityModel>
  • Parameters: None
  • Permissions: CanSeeAllEntities

2. GET: /api/Courses/{courseId}/Entities/All

  • Description: Retrieves a list of all available entities for this course.
  • Response Format: JSON of IEnumerable<EntityModel>
  • Parameters: {courseId} of type int
  • Permissions: CanSeeEntities

3. GET: /api/Courses/{courseId}/Entities/Get/{entityId}

  • Description: Retrieves the details of a particular entity.
  • Response Format: JSON of EntityModel
  • Parameters: {courseId} of type int and {entityId} of type int
  • Permissions: CanSeeEntities

4. GET: /api/Courses/{courseId}/Entities/GetTask/{entityId}

  • Description: Retrieves the details of the Task to which a particular entity belongs to.
  • Response Format: JSON of TaskModel
  • Parameters: {courseId} of type int and {entityId} of type int
  • Permissions: CanSeeTasks

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

  • Description: Add a new entity.
  • Response Format: JSON of the added EntityModel
  • Parameters: {courseId} of type int and {entity} of type EntityModel (JSON in the body of the message)
  • Permissions: CanCreateEntities

6. PUT: /api/Courses/{courseId}/Entities/Update/{entityId}

  • Description: Update an existing entity.
  • Response Format: JSON of the updated EntityModel
  • Parameters: {courseId} of type int and {entityId} of type int and {entity} of type EntityModel (JSON in the body of the message)
  • Permissions: CanUpdateEntities

7. DELETE: /api/Courses/{courseId}/Entities/Delete/{entityId}

  • Description: Delete an existing entity.
  • Response Format: HttpStatusCode
  • Parameters: {courseId} of type int and {entityId} of type int
  • Permissions: CanDeleteEntities

Clone this wiki locally