Groups
A group in Coassemble is a collection of learners that can be enrolled in one or many courses. Adding a group into a course, automatically enrolls every learner into that course. Learners added at a later date, will be enrolled into the same course.
GET /api/v1/groups
Returns a list of all groups in your workspace. 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.
Query parameters
Field | Type | Description | Required | Default | Pattern |
---|
owner | string | Owner User ID | No | null | \d+ |
course | string | Course ID | No | null | \d+ |
search | string | Search by Group name | No | "" | N/A |
sort | string | Sort by | No | "created" | (alpha|recent|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+ |
simple | string | Simple search | No | null | (true|false) |
Responses
Code | Description |
---|
200 | Returned when successful |
POST /api/v1/groups
Create a new group.
FormData properties
Field | Description | Required |
---|
name | Group name | No |
Responses
Code | Description |
---|
201 | Returned when successful |
GET /api/v1/groups/{group}
Get details of specific group.
Path variables
Field | Description |
---|
group | ID of group you want details about |
Responses
Code | Description |
---|
200 | Returned when successful |
DELETE /api/v1/groups/{group}
Delete an existing group.
Path variables
Field | Description |
---|
group | ID of group you wish to delete |
Responses
Code | Description |
---|
204 | Returned when successful |
PATCH /api/v1/groups/{group}
This endpoint can change the name of the group.
Path variables
Field | Description |
---|
group | ID of group you wish to modify |
FormData properties
Field | Description | Required |
---|
name | Group name | No |
Responses
Code | Description |
---|
204 | Returned when successful |
POST /api/v1/groups/{source}/copies
Duplicate an existing group.
Path variables
Query parameters
Field | Type | Description | Required | Default | Pattern |
---|
name | string | Name of new group | No | null | \w+ |
Responses
Code | Description |
---|
200 | Returned when successful |
GET /api/v1/groups/{group}/students
Returns a list of learners in a specific group.
Path variables
Field | Description |
---|
group | ID of the group |
Query parameters
Field | Type | Description | Required | Default | Pattern |
---|
page | string | Which page of items to display, starting with zero | No | "0" | \d+ |
length | string | Items per page (0-100) | No | "10" | \d+ |
search | string | An input to search for | No | "" | N/A |
Responses
Code | Description |
---|
200 | Returned when successful |
POST /api/v1/groups/{group}/students
Add one or many existing learners into a group.
Path variables
Field | Description |
---|
group | ID of the group |
Body properties
Field | Type | Description | Required |
---|
ids | integer[] | | No |
Responses
Code | Description |
---|
204 | Returned when successful |
GET /api/v1/groups/{group}/teachers
Returns a list of trainers who teach a group.
Path variables
Field | Description |
---|
group | ID of the group |
Responses
Code | Description |
---|
200 | Returned when successful |
POST /api/v1/groups/{group}/teachers
Add one or many existing trainers to a group.
Path variables
Field | Description |
---|
group | ID of the group |
Body properties
Field | Type | Description | Required |
---|
ids | integer[] | | No |
Responses
Code | Description |
---|
204 | Returned when successful |