PUT restapi/personal/courses/{courseId}/groupsets/v1
Create or replace existing course groups sets in specified course.
If the course groups don't exist yet, new groups will be created and identifiers of the created groups will be returned in the response with the same ordering as was given in the request.
If course groups already exist, then the groups will be updated. Any existing participants of any existing course groups will be replaced by new participants from this request. Course group titles will also be updated.
The user needs course-admin rights in the course to be authorized.
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
courseId |
Identifier of a course. |
integer |
Required |
Body Parameters
Object containing group set id, title and course groups.
Itslearning.RestApi.Entities.CourseGroups.CourseGroupSetName | Description | Type | Additional information |
---|---|---|---|
GroupSetId |
Group set identifier. |
integer |
None. |
Title |
Group set title. |
string |
None. |
Groups |
Array of groups in the current group set. |
Collection of Itslearning.RestApi.Entities.CourseGroups.CourseGroup |
None. |
Request Formats
application/json, text/json
{ "GroupSetId": 1, "Title": "sample string 2", "Groups": [ { "GroupId": 1, "Title": "sample string 2", "ParticipantIds": [ 1, 2 ] }, { "GroupId": 1, "Title": "sample string 2", "ParticipantIds": [ 1, 2 ] } ] }
application/xml, text/xml
<CourseGroupSet xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GroupSetId>1</GroupSetId> <Groups> <CourseGroup> <GroupId>1</GroupId> <ParticipantIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:int>1</d4p1:int> <d4p1:int>2</d4p1:int> </ParticipantIds> <Title>sample string 2</Title> </CourseGroup> <CourseGroup> <GroupId>1</GroupId> <ParticipantIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d4p1:int>1</d4p1:int> <d4p1:int>2</d4p1:int> </ParticipantIds> <Title>sample string 2</Title> </CourseGroup> </Groups> <Title>sample string 2</Title> </CourseGroupSet>
application/x-www-form-urlencoded
No sample available
Response Information
Resource Description
Object containing CourseGroupSetId and array of CourseGroupIds in the same order that was presented by input object.
Itslearning.RestApi.Entities.CourseGroups.CourseGroupSetSimpleName | Description | Type | Additional information |
---|---|---|---|
GroupSetId |
Group set identifier. |
integer |
None. |
GroupIds |
Array of groups identifiers in the current group set. |
Collection of integer |
None. |
Response Formats
application/json, text/json
{ "GroupSetId": 1, "GroupIds": [ 1, 2 ] }
application/xml, text/xml
<CourseGroupSetSimple xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <GroupIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays"> <d2p1:int>1</d2p1:int> <d2p1:int>2</d2p1:int> </GroupIds> <GroupSetId>1</GroupSetId> </CourseGroupSetSimple>