Skip to content

API: Classes endpoints

/classes

GET /classes

List owned and managed classes.

[] Output:

  • list
    • string code: class identification string
    • string name: title of the class

/class

GET /class

Get/check class.

[] Input:

  • [!] string class: class identification string

[] Output:

  • string class: class identification string
  • string name: title of the class
  • datetime/null start: start date and time (if set)
  • datetime/null end: end date and time (if set)

/class:assignments

GET /class:assignments

List all assignments in a class.

[] Input:

  • [!] string class: class identification string

[] Output:

  • list
    • string code: assignment identification string
    • string name: title of the assignment
    • string link: link to the assignment page
    • string status: assignment and submission state
      • INACTIVE: assignment is not active
      • ACTIVE: assignment is currently active and a new submission can be started
      • STARTED: uploaded files but not submitted
      • SUBMITTED: assignment is submitted
      • GRADED: submitted and also graded
    • datetime starts: when the assignment submission starts
    • datetime ends: when the assignment submission ends

/class:members

GET /class:members

List all members in a class.

[] Input:

  • [!] string class: class identification string

[] Output:

  • list
    • string code: user identification string
    • string name: name of the member
    • boolean active: active membership (approved and not expired)

POST /class:members

Assign user(s) to a class. Updates memberships if already member of the class.

[] Input:

  • [!] string class: class identification string
  • [!] string users: comma-separated list of user identification strings
  • integer/datetime expires: expiry in days or YYYY-MM-DD HH:ii:ss
  • boolean notify: notify users
    • default: false

DELETE /class:members

Remove user(s) from a class.

[] Input:

  • [!] string class: class identification string
  • [!] string users: comma-separated list of user identification strings

/classes:members

POST /classes:members

Assign user(s) to class(es). Updates memberships if already member of a class.

[] Input:

  • [!] string classes: comma-separated list of class identification strings
  • [!] string users: comma-separated list of user identification strings
  • integer/datetime expires: expiry in days or YYYY-MM-DD HH:ii:ss
  • boolean notify: notify users
    • default: false

/user:classes

GET /user:classes

List all classes a user is member of.

[] Input:

  • [!] string user: user identification string

[] Output:

  • list
    • string code: class identification string
    • string name: title of the class
    • string link: link to the class page
    • boolean active: active membership (approved and not expired)

POST /user:classes

Assign user to class(es). Updates membership if already member of a class.

[] Input:

  • [!] string user: user identification string
  • [!] string classes: comma-separated list of class identification strings
  • integer/datetime expires: expiry in days or YYYY-MM-DD HH:ii:ss
  • boolean notify: notify user
    • default: false

DELETE /user:classes

Remove user from class(es).

[] Input:

  • [!] string user: user identification string
  • [!] string classes: comma-separated list of class identification strings