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

NameDescriptionTypeAdditional information
courseId

Identifier of a course.

integer

Required

Body Parameters

Object containing group set id, title and course groups.

Itslearning.RestApi.Entities.CourseGroups.CourseGroupSet
NameDescriptionTypeAdditional 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

Sample:
{
  "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

Sample:
<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

Sample:
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.CourseGroupSetSimple
NameDescriptionTypeAdditional 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

Sample:
{
  "GroupSetId": 1,
  "GroupIds": [
    1,
    2
  ]
}

application/xml, text/xml

Sample:
<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>