Fork me on GitHub

In the context of API, a discipline – which is known as course in US university system, and module in the UK one – is referred as space. The space is where social interactions (see status) happen, and the content (see subject) is posted.

GET /api/spaces/:id

Returns the space in question.

Authorization

You need to be enrolled in the Course to which the space belongs.

Parameters

Parameter Description Restrictions
id Space ID N/A

PUT /api/spaces/:id

Updates information of the space.

Parameters

Parameter Description Restrictions
space[name] Space name Maximum 40 characters; it must be unique
space[description] Space description Maximum 400 characters

POST /api/courses/:course_id/spaces

Creates a space in the context of the course specified by course_id.

Authorization

You need to be either teacher or environment_admin in the course.

Parameters

Parameter Description Restrictions
course_id Course ID N/A
space[name] Space ID Maximum 40 character
space[description] Space description Maximum 400 characters

Example

POST /api/courses/foo/spaces

Payload:

{
  "space" : {
    "name" : "minha nova disciplina"
  }
}

Response:

{
  "links": [
  {
    "href": "http://www.redu.com.br/api/spaces/1626",
      "rel": "self"
  },
  {
    "href": "http://www.redu.com.br/api/courses/meu-novo-curso",
    "rel": "course"
  },
  {
    "href": "http://www.redu.com.br/api/environments/www",
    "rel": "environment"
  },
  {
    "href": "http://www.redu.com.br/api/spaces/1626/users",
    "rel": "users"
  },
  {
    "href": "http://www.redu.com.br/api/spaces/1626/subjects",
    "rel": "subjects"
  },
  {
    "href": "http://www.redu.com.br/api/spaces/1626/statuses",
    "rel": "statuses"
  },
  {
    "href": "http://www.redu.com.br/api/spaces/1626/statuses/timeline",
    "rel": "timeline"
  }
  ],
    "name": "minha nova disciplina",
    "created_at": "2012-09-10T09:51:23-03:00",
    "id": 1626
}

GET /api/courses/:course_id/spaces

Returns a list of spaces for the specified course.

Authorization

You need to be enrolled in the course.

Parameters

Parameter Description Restrictions
course_id ID or path to course N/A

DELETE /api/spaces/:id

Deletes a space. The users who participate in the course to which the space belongs will no longer have access to its subjects and lectures.

Authorization

You need to be either teacher or environment_admin in the course.

Parameters

Parameter Description Restrictions
id Space ID N/A