Skip to main content
PATCH
/
group
/
{id}
Python (SDK)
from meitner import Meitner, models
import os


with Meitner(
    security=models.Security(
        client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
        client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
    ),
) as m_client:

    res = m_client.groups.update(id="123e4567-e89b-12d3-a456-426614174000", title="1A", external={
        "source_id": "12345678",
    }, types=[
        "Class",
    ], moderator_i_ds=[
        "123e4567-e89b-12d3-a456-426614174000",
    ], member_i_ds=[
        "123e4567-e89b-12d3-a456-426614174000",
    ])

    # Handle response
    print(res)
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "meta": {
    "createdAt": "2024-01-15T10:30:00Z",
    "createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
    "updatedAt": "2024-01-15T14:45:00Z",
    "updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
  },
  "external": {
    "sourceID": "12345678",
    "source": "ExternalIntegrationAPI"
  },
  "schoolID": "123e4567-e89b-12d3-a456-426614174000",
  "category": "Education",
  "title": "1A",
  "types": [
    "Class"
  ],
  "moderatorIDs": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "memberIDs": [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
}

Authorizations

Client-ID
string
header
required
Client-Secret
string
header
required

Path Parameters

id
string<uuid>
required

The unique identifier of the Group to update

Body

application/json

Request body

title
string
required

The title of the group, must be unique within the school.

external
object

External is the External-object used on Update and Create operations, since it should only be allowed to set SourceID for the employee, the Source-field is not included.

Example:
{ "sourceID": "12345678" }
types
enum<string>[]

The types of the group

The type of the group

Available options:
Class,
Childcare,
Mentor
moderatorIDs
string<uuid>[]

The IDs of the moderators of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Moderators have to be employees of the school.

memberIDs
string<uuid>[]

The IDs of the members of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Members have to be students of the school.

Response

Response for Group Update operation - returns the updated Group

Group holds the information about a group of students.

id
string<uuid>
required

Unique identifier for the Group

schoolID
string<uuid>
required

The ID of the school the group belongs to

title
string
required

The title of the group, must be unique within the school.

meta
object

Metadata information for the Group

Example:
{
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
  "updatedAt": "2024-01-15T14:45:00Z",
  "updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
}
external
object

External is a reusable object that can be used to store external information about the employee from another system, used for third-party integration tracking.

Example:
{
  "sourceID": "12345678",
  "source": "ExternalIntegrationAPI"
}
category
enum<string>
default:Education

If the category is Education, the ModeratorIDs have to be employees and the MemberIDs have to be students of the school. If the category is Other, it will not be possible to use the IsClass, IsChildcare and IsMentor fields.

Available options:
Education,
Other
Example:

"Education"

types
enum<string>[]

The types of the group

The type of the group

Available options:
Class,
Childcare,
Mentor
moderatorIDs
string<uuid>[]

The IDs of the moderators of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Moderators have to be employees of the school.

memberIDs
string<uuid>[]

The IDs of the members of the group. Can be any user type (Student, Employee, Guardian) if the Category is Other. If the Category is Education, the Members have to be students of the school.