-
Notifications
You must be signed in to change notification settings - Fork 1
WebUntis API Doc
Kurt S edited this page Sep 1, 2023
·
8 revisions
Only works if you send valid session cookie. Returns JWT object containing the following structure:
{
"tenant_id": "0", // School ID?
"sub": "Displayname", // Displayname
"roles": "STUDENT", // Roles
"iss": "webuntis",
"locale": "de",
"sc": "de",
"user_type": "USER", // user type
"user_id": 0, // user id
"host": "mese.webuntis.com", // host the api uses
"sn": "OSZ IMT", // capitalized school name
"scopes": "",
"exp": 1689078736, //session expire time
"per": [],
"iat": 1689077836, //session expire time?
"username": "user_name",
"sr": "DE-BE",
"person_id": 0 // person ID
}
GET https://mese.webuntis.com/WebUntis/api/rest/view/v1/calendar-entry/detail?elementId={elementID}&elementType={elementType}&endDateTime=2023-07-11T15%3A00%3A00&homeworkOption=DUE&startDateTime=2023-07-11T13%3A30%3A00
Parameters:
- elementType int (usually 5 for classes)
- elementId int
Response:
{
"calendarEntries": [
{
"absenceReasonId": null,
"booking": null,
"color": null,
"endDateTime": "2023-07-11T15:00:00",
"exam": null,
"homeworks": [],
"id": 0, // ID of the calendar event
"integrationsSection": [],
"klasses": [
{
"displayName": "Klasse", // Display name of the klass
"hasTimetable": true,
"id": 0, // KlassenID
"longName": "", // Long name of the Klass
"shortName": "Klasse" // Short name of the Klass
}
],
"lesson": {
"lessonId": 0, // ID of the lesson
"lessonNumber": 0 // number of the lesson
},
"lessonInfo": null,
"mainStudentGroup": null,
"messengerChannel": null,
"notesAll": "wir treffen uns an der Sporthalle", // notes about the lesson
"notesAllFiles": [],
"notesStaff": null,
"notesStaffFiles": [],
"originalCalendarEntry": null,
"permissions": [
"READ_HOMEWORK"
],
"resources": [],
"rooms": [
{
"displayName": "Raum 1", // Display name of room
"hasTimetable": false,
"id": 0, // room id
"longName": "Raum Eins", // Long name of room
"shortName": "Raum 1", // Short name of room
"status": "REGULAR"
}
],
"singleEntries": [],
"startDateTime": "2023-07-11T13:30:00",
"status": "TAKING_PLACE",
"students": [],
"subType": {
"displayInPeriodDetails": false,
"displayName": "Unterricht",
"id": 1
},
"subject": {
"displayName": "Fach", // Display name of the subject
"hasTimetable": false,
"id": 0, // Subject ID
"longName": "Fachname", // Long subject name
"shortName": "Fach" // Short subject name
},
"substText": null,
"teachers": [
{
"displayName": "Teach1", // Teacher Display name
"hasTimetable": false,
"id": 0, // Teacher ID
"imageUrl": null,
"longName": "Teacher Eins", // Long Teacher name
"shortName": "Tea1", // Short Teacher Name
"status": "REGULAR"
},
{
"displayName": "Teach2",
"hasTimetable": false,
"id": 0,
"imageUrl": null,
"longName": "Teacher Zwei",
"shortName": "Tea2",
"status": "REGULAR"
}
],
"teachingContent": "Unterrichtsinhalt der Stunde", // Teaching content of this lesson
"teachingContentFiles": [],
"type": "NORMAL_TEACHING_PERIOD",
"videoCall": null
}
]
}
Parameters:
- startDate string
- endDate string Note: All Dates are in a special time format to webuntis. The first 4 digits are the year, the next two are the month (00 (January) to 11 (December)) and the last 2 digits are the day of the month (01 to 31).
Response:
{
"data": {
"records": [
// Homework records for different assignments
{ "homeworkId": XXXX, "teacherId": XX, "elementIds": [XXXX] }
],
"homeworks": [
// Homework details
{
"id": XXXX, // Homework ID
"lessonId": XXXXX, // Lesson ID related to this homework
"date": XXXXXXXX, // Date when the homework was assigned (YYYYMMDD)
"dueDate": XXXXXXXX, // Due date for the homework (YYYYMMDD)
"text": "", // Homework description
"remark": "", // Any additional remark for the homework
"completed": false, // Flag indicating if the homework is completed (false for incomplete, true for completed)
"attachments": [] // Array of attachments associated with the homework
}
],
"teachers": [
// Teacher details
{ "id": XXX, "name": "XXX" }
],
"lessons": [
// Lesson details
{ "id": XXXXX, "subject": "XXX", "lessonType": "Unterricht" }
]
}
}
GET https://mese.webuntis.com/WebUntis/api/classreg/absences/students?startDate=20220822&endDate=20230712&studentId=8411&excuseStatusId=-1
Parameters:
- startDate string
- endDate string
- studentId
- excuseStatusId
Response:
{
"data": {
"absences": [
// Absence records
{
"id": XXXXXX, // Absence ID
"startDate": XXXXXXXX, // Start date of the absence
"endDate": XXXXXXXX, // End date of the absence
"startTime": XXXX, // Start time of the absence
"endTime": XXXX, // End time of the absence
"createDate": XXXXXXXXXXXXX, // Timestamp when the absence record was created
"lastUpdate": XXXXXXXXXXXXX, // Timestamp when the absence record was last updated
"createdUser": "", // User who created the absence record
"updatedUser": "", // User who last updated the absence record
"reasonId": X, // ID of the absence reason
"reason": "", // Description of the absence reason
"text": "", // Additional information about the absence
"interruptions": [], // Array of interruptions during the absence
"canEdit": false, // Flag indicating if the absence record can be edited
"studentName": "", // Name of the student associated with the absence
"excuseStatus": "", // Status of the excuse
"isExcused": true, // Flag indicating if the absence is excused
"excuse": {
"id": XXXXXX, // ID of the excuse
"text": "", // Additional information about the excuse
"excuseDate": XXXXXXXX, // Date when the excuse was provided
"excuseStatus": "", // Status of the excuse
"isExcused": true, // Flag indicating if the excuse is valid
"userId": XXXX, // ID of the user associated with the excuse
"username": "" // Username of the user associated with the excuse
}
}
],
"absenceReasons": [], // Array of possible absence reasons
"excuseStatuses": null, // List of possible excuse statuses
"showAbsenceReasonChange": false, // Flag indicating if absence reasons can be changed
"showCreateAbsence": false // Flag indicating if creating a new absence is allowed
}
}
GET https://mese.webuntis.com/WebUntis/api/exams?startDate=20230701&endDate=20230731&studentId=8411&withGrades=true&klasseId=-1
Parameters:
- startDate
- endDate
- studentId
- withGrades
- klasseId/classId
Response:
{
"data": {
"exams": [
// List of exams
]
}
}