Enrolments
When a user is enrolled in a course, their progress is tracked and can be analyzed in reports. Use these endpoints to search for and create enrollments.
Endpoints
GET /api/v1/enrolmentsPOST /api/v1/enrolmentsDELETE /api/v1/enrolmentsPOST /api/v1/enrolments/batchPOST /api/v1/enrolments/group/batch
Get enrolments
GET /api/v1/enrolments
Returns a list of all the enrolments in your workspace. The enrolments are returned sorted by enrolment date in ascending order. Filter enrolments using the query parameters listed in the table.
Query parameters
| Field | Type | Description | Required | Default | Pattern |
|---|---|---|---|---|---|
course | string | Course ID | No | null | \d+ |
group | string | Group ID | No | null | \d+ |
user | string | User ID | No | null | \d+ |
search | string | search by name, email, course code or title | No | "" | [\w\-\s]+ |
sort | string | Sort by | No | "created" | (created) |
page | string | Which page of items to display, starting with zero | No | "0" | \d+ |
length | string | Items per page (0-100) | No | "10" | \d+ |
Responses
| Code | Description |
|---|---|
| 200 | Returned when successful |
Create enrolments
POST /api/v1/enrolments
Enrol existing users into a course or via a group.
FormData properties
| Field | Description | Required |
|---|---|---|
user | ID of the User | No |
course | ID of the Course | No |
group | ID of the Group | No |
role | User's role | No |
Responses
| Code | Description |
|---|---|
| 201 | Returned when successful |
Remove enrolments
DELETE /api/v1/enrolment
Remove enrolled users from a course or group.
Query parameters
| Field | Type | Description | Required | Default | Pattern |
|---|---|---|---|---|---|
user | string | ID of the User | No | null | \d+ |
course | string | ID of the Course | No | null | \d+ |
group | string | ID of the Group | No | null | \d+ |
role | string | User's role. Specify `teacher` to remove a trainer from a group | No | "student" | (teacher|student) |
Responses
| Code | Description |
|---|---|
| 201 | Returned when successful |
Batch enrolments
POST /api/v1/enrolments/batch
Enrol one or more existing learners into one or more existing courses or groups. You can specify courses or groups. You must specify students.
Body properties
| Field | Type | Description | Required |
|---|---|---|---|
courses | integer[] | Yes | |
groups | integer[] | Yes | |
students | integer[] | Yes |
Responses
| Code | Description |
|---|---|
| 204 | Returned when successful |
Batch enrol groups
POST /api/v1/enrolments/group/batch
Enrol a group into multiple courses.
Body properties
| Field | Type | Description | Required |
|---|---|---|---|
group | integer | ID for the group you want to enrol into multiple courses | No |
courses | integer[] | IDs for the courses in which you want to enrol the group. | No |
Responses
| Code | Description |
|---|---|
| 204 | Returned when successful |