Fork me on GitHub

In the context of API, the module is referred as suject. It is a group of several lectures (contents) in a context.

GET /api/spaces/:space_id/subjects

Returns the subjects of a space.

Parameters

Parameter Description Restrictions
space_id Space ID N/A

GET /api/sujects/:id

Returns the subject in question.

Parameters

Parameter Description Restrictions
id Subject ID N/A

POST /api/spaces/:space_id/subjects

Creates a subject in the context of the space specified by space_id.

Parameters

Parameter Description Restrictions
space_id Space ID N/A
subject[name] Subject name Maximum 40 characters
subject[description] Subject description Maximum 250 characters

Example

POST /api/spaces/1/subjects

Payload:

{
  "subject": {
    "name": "Novo módulo",
      "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit"
  }
}

Response:

{
  "id": 1,
    "title": "Novo módulo",
    "description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit",
    "created_at": "2012-04-27T13:07:21-03:00"
      "links": [{
        "rel": "self",
        "href": "http://www.redu.com.br/api/subjects/1"
      }, {
        "rel": "lectures",
        "href": "http://www.redu.com.br/api/subjects/1/lectures"
      }, {
        "rel": "space",
        "href": "http://www.redu.com.br/api/spaces/1"
      }, {
        "rel": "course",
        "href": "http://www.redu.com.br/api/courses/course-name"
      }, {
        "rel": "environment",
        "href": "http://www.redu.com.br/api/environments/environment-name"
      }, {
        "rel": "users",
        "href": "http://www.redu.com.br/api/subjects/347/users"
      }]
}

PUT /api/subjects/:id

Updates information of the subject.

Parameters

Parameter Description Restrictions
subject[name] Subject name Maximum 40 characters
subject[description] Subject description Maximum 250 characters

DELETE /api/subjects/:id

Deletes a subject. The users who participate in that subject will no longer have access to its lectures.

Parameters

Parameter Description Restrictions
id Subject ID N/A