Login

Groups in courses

This section relates specifically to the relationship between groups and courses. Groups can be enrolled into a course either before or after a learner has been added to a group. If a learner is added to a group, they inherit the enrolment of any course the group is enrolled in.

Endpoints

Get groups enrolled in a course

GET /api/v1/courses/{course}/groups

Returns a list of all the groups enrolled in a specific course. The groups are returned sorted by creation date, with the most recently created groups appearing first. Filter groups using the query parameters listed in the table.

Path variables

FieldDescription
courseCourse ID

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
ownerstringOwner User IDNonull\d+
searchstringSearch by Group nameNo"" N/A
sortstringSort byNo"created"(alpha|recent|created)
pagestringWhich page of items to display, starting with zeroNo"0"\d+
lengthstringItems per page (0-100)No"10"\d+

Responses

CodeDescription
200Returned when successful

Create and enrol a group

POST /api/v1/courses/{course}/groups

Create a new group, and enrol it into a specific course.

Path variables

FieldDescription
courseCourse ID

FormData properties

FieldDescriptionRequired
nameGroup NameNo

Responses

CodeDescription
201Returned when successful

Get group in a course

GET /api/v1/courses/{course}/groups/{group}

Get the details of a specific group enrolled in a specific course.

Path variables

FieldDescription
courseCourse ID
groupGroup ID

Responses

CodeDescription
200Returned when successful

Enrol existing group

POST /api/v1/courses/{course}/groups/{group}/links

Enrol an existing group into an existing course.

Path variables

FieldDescription
courseCourse ID
group

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
startstringWhen this group should start the courseNonull N/A
endstringWhen this group should finish the courseNonull N/A

Responses

CodeDescription
200Returned when successful

Get learners in a group

GET /api/v1/courses/{course}/groups/{group}/students

Returns a list of all of the learners enrolled into a specific course via a specific group.

Path variables

FieldDescription
courseCourse ID
groupGroup ID

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
pagestringWhich page of items to display, starting with zeroNo"0"\d+
lengthstringItems per page (0-100)No"10"\d+
searchstringAn input to search forNo"" N/A

Responses

CodeDescription
200Returned when successful

Get trainers in a group

GET /api/v1/courses/{course}/groups/{group}/teachers

Returns a list of all of the trainers enrolled into a specific course via a specific group.

Path variables

FieldDescription
courseCourse ID
groupGroup ID

Query parameters

FieldTypeDescriptionRequiredDefaultPattern
pagestringWhich page of items to display, starting with zeroNo"0"\d+
lengthstringItems per page (0-100)No"10"\d+
searchstringAn input to search forNo"" N/A

Responses

CodeDescription
200Returned when successful