Skip to main content

Import Entities

User​

URL: https://TODO_FLOW_HOST/import/users?importerId=TODO_REPLACE_WITH_IMPORTER_ID

info

All sample data for the User entity use the value flowdemo123 to calculate the passwordOrHash property.

Body​

fieldtypedescription
idStringUnique identifier of the user.
firstNameStringFirst name of the user.
lastNameStringLast name of the user.
usernameString?If set, this can be used to log in instead of the email.
studentEmailString?Can be used to log in and is used to send email notifications to the user.
staffEmailString?Can be used to log in and is used to send email notifications to the user.
campusManagementRolesString[]?Roles of the user within the campus management system. Used for the role mapping. Also see the role mapping settings in Flow.
passwordOrHashString?Hashed or plaintext password. If hashed then passwordPreHashing must be specified. See documentation of the DatabasePasswordLoginProvider for security considerations.
passwordPreHashingobject?Describes the hashing method used to generate passwordOrHash from the user's password. Use null if the password is sent in plain text or another LoginProvider than DatabasePasswordLoginProvider is used. Also see documentation of the DatabasePasswordLoginProvider.
passwordPreHashing.algorithmStringHashing algorithm that is used. For available options, see DatabasePasswordLoginProvider documentation.
passwordPreHashing.saltModeStringSalt mode to use. For available options, see DatabasePasswordLoginProvider documentation.
passwordPreHashing.saltString?Salt that is used. Use null if saltMode is NONE.
passwordPreHashing.hmacKeyString?The Hmac key that is used. Only needed if algorithm specifies a Hmac algorithm.
passwordPreHashing.pbeInfosobject?Configuration for the PBE algorithm. Only needed if algorithm specifies a PBE algorithm.
passwordPreHashing.pbeInfos.iterationCountintIteration count used for PBE.
passwordPreHashing.pbeInfos.keyLengthintKey length used for PBE.

Example Request​

POST https://TODO_FLOW_HOST/import/users?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"id" : "prof2",
"firstName" : "Klaus",
"lastName" : "Klammer",
"campusManagementRoles" : [ "CM_ROLE_EXEMPTION_COMMENTER" ],
"staffEmail" : "prof2@example.org",
"passwordOrHash" : "ZGFsZGVtbzEyMw==",
"passwordPreHashing" : {
"algorithm" : "PBEWithHmacSHA512AndAES_256",
"salt" : "DemoSalt",
"saltMode" : "PBE_ALGORITHM",
"pbeInfos" : {
"iterationCount" : 2000,
"keyLength" : 512
},
},
}, ...
]

XML​

POST https://TODO_FLOW_HOST/import/users?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/xml"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

<ArrayList>
<item>
<id>prof2</id>
<firstName>Klaus</firstName>
<lastName>Klammer</lastName>
<staffEmail>prof2@example.org</staffEmail>
<campusManagementRoles>
<campusManagementRoles>CM_ROLE_EXEMPTION_COMMENTER</campusManagementRoles>
</campusManagementRoles>
<passwordOrHash>ZGFsZGVtbzEyMw==</passwordOrHash>
<passwordPreHashing>
<algorithm>PBEWithHmacSHA512AndAES_256</algorithm>
<salt>DemoSalt</salt>
<saltMode>PBE_ALGORITHM</saltMode>
<pbeInfos>
<iterationCount>2000</iterationCount>
<keyLength>512</keyLength>
</pbeInfos>
</passwordPreHashing>
</item>
...
</ArrayList>

Student​

URL: https://TODO_FLOW_HOST/import/students?importerId=TODO_REPLACE_WITH_IMPORTER_ID

Body​

fieldtypedescription
userIdStringUnique identifier of the associated user.
matriculationNumberString?Matriculation number of the student.
coursesobject[]?Courses the student is registered for.
courses.courseIdStringUnique identifier of the course.
courses.groupIdStringUnique identifier of the group within the course.
courseIdsWithCustomGroupRegistrationString[]?Unique identifiers of courses where the student has to register to a group by themselves.
studyProgramString?Name of the study programme of the student.

Example Request​

POST https://TODO_FLOW_HOST/import/students?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"userId" : "50767",
"matriculationNumber" : "50431165",
"courses" : [
{
"courseId" : "course-0",
"groupId" : "group-1"
}
],
"courseIdsWithCustomGroupRegistration" : [ "course-5", "course-6", "course-7" ],
"studyProgram" : "Computer Science"
}, ...
]

XML​

POST https://TODO_FLOW_HOST/import/students?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/xml"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

<ArrayList>
<item>
<userId>50767</userId>
<matriculationNumber>50431165</matriculationNumber>
<courses>
<courses>
<courseId>course-0</courseId>
<groupId>group-1</groupId>
</courses>
</courses>
<courseIdsWithCustomGroupRegistration>
<courseIdsWithCustomGroupRegistration>course-5</courseIdsWithCustomGroupRegistration>
<courseIdsWithCustomGroupRegistration>course-6</courseIdsWithCustomGroupRegistration>
</courseIdsWithCustomGroupRegistration>
<studyProgram>Computer Science</studyProgram>
</item>
...
</ArrayList>

Organization​

URL: https://TODO_FLOW_HOST/import/organizations?importerId=TODO_REPLACE_WITH_IMPORTER_ID

note

If you do not need the organisations concept, you still have to create one root/default organisation to which all courses are attached.

Body​

fieldtypedescription
idStringUnique identifier of the organisation.
nameStringDisplay name of the organisation.
moderatorUserIdsString[]Unique identifiers of users who have moderator access to this organisation.
msTeamsModeratorUserIdsString[]?Unique identifiers of users which have moderator access for the Microsoft Teams plugin.

Example Request​

POST https://TODO_FLOW_HOST/import/organizations?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"id" : "organisation1",
"name" : "Department of Mathematics",
"moderatorUserIds" : [ "manager1", "manager2" ],
"msTeamsModeratorUserIds" : [ "manager1" ]
}, ...
]

XML​

POST https://TODO_FLOW_HOST/import/organizations?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/xml"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

<ArrayList>
<item>
<id>organisation1</id>
<name>Department of Mathematics</name>
<moderatorUserIds>
<moderatorUserIds>manager1</moderatorUserIds>
<moderatorUserIds>manager2</moderatorUserIds>
</moderatorUserIds>
<msTeamsModeratorUserIds>
<msTeamsModeratorUserIds>manager1</msTeamsModeratorUserIds>
</msTeamsModeratorUserIds>
</item>
...
</ArrayList>

Course​

URL: https://TODO_FLOW_HOST/import/courses?importerId=TODO_REPLACE_WITH_IMPORTER_ID

Body​

fieldtypedescription
idStringUnique identifier of the course.
organizationIdStringUnique identifier of the organisation to which the course belongs.
numberStringInternal number of the course.
nameStringDisplay name of the course.
semesterStringUnique identifier of the semester which the course belongs to (see Semesters-Configuration in Flow).
requiredPresenceRateint?Presence rate that is required to pass the course (0 - 100). Defaults to the defaultPresenceRate set in the System Configuration.
groupRegistrationStartDateDate?Start date and time for the group registration. Users with this course's ID in courseIdsWithCustomGroupRegistration can register for a group in this course beginning with this date. (When imported, the value cannot be changed in the Course Settings.)
groupRegistrationEndDateDate?End date and time for the group registration. (When imported, the value cannot be changed in the Course Settings.)
menuLinksobject[]?List of links which should be shown on the course page.
menuLinks.titleStringTitle of the link to be displayed.
menuLinks.descriptionStringDescription for the link/action. Will be shown beneath the title or when hovering the button.
menuLinks.urlStringThe URL to open on click. Can be a URL to a Flow HTML module or to an external system.
menuLinks.inlinebooleanIf true a button will be shown in the top bar. Otherwise, the item will be shown in the 3-dot menu.
autoApproveAttendanceRequestsboolean?If true attendance requests will be auto approved when requested by the student and can be later denied by moderators.
attendanceRequestDeadlineDaysint?If set it overwrites attendanceRequestDeadlineDays in the System Configuration for the particular course.

Example Request​

POST https://TODO_FLOW_HOST/import/courses?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"id" : "course-0",
"organizationId" : "organisation1",
"number" : "FLOW-000",
"name" : "Economics",
"semester" : "2023",
"requiredPresenceRate" : 75,
"groupRegistrationStartDate" : "2023-03-11T08:00:00.000+01",
"groupRegistrationEndDate" : "2023-03-17T20:00:00.000+01",
"menuLinks" : [
{
"title" : "Moodle Course",
"description" : "Go to the moodle course",
"url" : "https://moodle.org/course/course-0",
"inline" : true
}
]
"autoApproveAttendanceRequests": true,
"attendanceRequestDeadlineDays": 7,
}, ...
]

XML​

POST https://TODO_FLOW_HOST/import/courses?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/xml"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

<ArrayList>
<item>
<id>course-0</id>
<organizationId>organisation1</organizationId>
<number>FLOW-000</number>
<name>Economics</name>
<semester>2023S</semester>
<requiredPresenceRate>75</requiredPresenceRate>
<groupRegistrationStartDate>2023-03-11T08:00:00.000+01</groupRegistrationStartDate>
<groupRegistrationEndDate>2023-03-17T20:00:00.000+01</groupRegistrationEndDate>
<menuLinks>
<menuLinks>
<title>Moodle Course</title>
<description>Go to the moodle course</description>
<url>https://moodle.org/course/course-0</url>
<inline>true</inline>
</menuLinks>
</menuLinks>
<autoApproveAttendanceRequests>true</autoApproveAttendanceRequests>
<attendanceRequestDeadlineDays>7</attendanceRequestDeadlineDays>
</item>
...
</ArrayList>

Group​

URL: https://TODO_FLOW_HOST/import/groups?importerId=TODO_REPLACE_WITH_IMPORTER_ID

If you do not need the groups concept, you still have to create one default group for each course to attach all events of that course to that single group.

Body​

fieldtypedescription
idStringUnique identifier of the group.
nameStringDisplay name of the group.
courseIdStringUnique identifier of the course which the group belongs to.
sizeLimitint?Maximum number of students that can be in this group. Use a negative number for unlimited. Only relevant for courses which use the Flow group registration. (When imported, the value cannot be changed in the Course Settings.)
lecturerUserIdsString[]Unique identifiers of the users which are lecturers for this group of the course.

Example Request​

POST https://TODO_FLOW_HOST/import/groups?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"id" : "group-1",
"name" : "Group 1",
"courseId" : "course-0",
"sizeLimit" : null,
"lecturerUserIds" : [ "prof1" ]
}, ...
]

XML​

POST https://TODO_FLOW_HOST/import/groups?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/xml"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

<ArrayList>
<item>
<id>group-1</id>
<name>Group 1</name>
<courseId>course-0</courseId>
<sizeLimit/>
<lecturerUserIds>
<lecturerUserIds>prof1</lecturerUserIds>
</lecturerUserIds>
</item>
...
</ArrayList>

Event​

URL: https://TODO_FLOW_HOST/import/events?importerId=TODO_REPLACE_WITH_IMPORTER_ID

If an event takes place for multiple groups, you have to create a copy for each group.

Body​

fieldtypedescription
idStringUnique identifier of the event.
startDateStart date and time of the event.
endDateEnd date and time of the event.
locationString?Location where the event takes place.
teachingUnitsdouble?Number of teaching units. Used for the presence rate calculation. Defaults to 1.0. When set to 0.0 the event is considered as optional and does not have any influence on the precense rate.
courseIdStringUnique identifier of the course which this event belongs to.
groupIdStringUnique identifier of the group which this event belongs to.
typeString?Use ONLINE_TEAMS for events that should be synced with the Microsoft Teams Plugin. (Only relevant for the MS Teams Plugin)
lecturerUserIdString?Unique identifier of the user which is a lecturer for this event.
isSharedAcrossGroupsboolean?Should be set to true in case this event is shared accross all groups. Currently only relevant for the MS Teams Plugin. If true, a single Teams event is created and shared across all groups instead of one per group. Defaults to false.
onlineUrlString?URL to an online meeting. Shown to students in the event detail view as a join link.
foreignIdString?Identifier of the event in the institution's source system. Used by the Microsoft Teams synchronisation to share one online meeting between events of the same lesson and, optionally, in the meeting subject.
msTeamsMeetingobject?How the event's online meeting is set up. Only applies to events of type ONLINE_TEAMS. Each field is optional and falls back to the meeting defaults when not set. (Only relevant for Microsoft Teams synchronisation)
msTeamsMeeting.roomAccountUpnString?UPN of the Microsoft account of the room the event takes place in. Organises the event's online meeting when teamsModuleMeetingOrganizer is RoomAccount. Required in that mode, otherwise Flow skips the event's meeting.
msTeamsMeeting.autoRecordboolean?Whether the event's online meeting is recorded automatically. If not set, teamsModuleAutoRecordMeetings applies.
msTeamsMeeting.visitorRoleString?What participants joining through the meeting link may do. ATTENDEE: only organisers and presenters may present. PRESENTER: everyone may present.
msTeamsMeeting.lobbyBypassScopeString?Who joins the meeting without waiting in the lobby. EVERYONE, ORGANIZATION (users of your organisation), or ORGANIZER (only the organisers).
msTeamsMeeting.lobbyAdmittersString?Who may admit participants from the lobby. ORGANIZERS_AND_PRESENTERS or ORGANIZERS. If not set, the Microsoft Teams default applies.
msTeamsMeeting.meetingChatString?When the meeting chat is available. ENABLED: always. DURING_MEETING: only while the meeting takes place.
msTeamsMeeting.spokenLanguageTagString?BCP 47 tag of the language spoken in the event, for example sl-SI. Must be a language Microsoft Teams supports for transcription. Used for the transcript and subtitles when teamsModuleAllowTranscription is enabled. If not set, the organiser's default language applies.

Example Request​

POST https://TODO_FLOW_HOST/import/events?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"id" : "course0-group0-event10",
"start" : "2023-03-20T15:00:00.000+01",
"end" : "2023-03-20T17:15:00.000+01",
"location" : "Online",
"teachingUnits" : 3.0,
"courseId" : "course-0",
"groupId" : "group-1",
"lecturerUserId" : "prof1",
"isSharedAcrossGroups": false,
"onlineUrl" : "https://meet.example.org/course0-event10"
}, ...
]

XML​

POST https://TODO_FLOW_HOST/import/events?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/xml"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

<ArrayList>
<item>
<id>course0-group0-event10</id>
<start>2023-03-20T15:00:00.000+01</start>
<end>2023-03-20T17:15:00.000+01</end>
<location>Online</location>
<teachingUnits>3</teachingUnits>
<courseId>course-0</courseId>
<groupId>group-1</groupId>
<lecturerUserId>prof1</lecturerUserId>
<isSharedAcrossGroups>false</isSharedAcrossGroups>
<onlineUrl>https://meet.example.org/course0-event10</onlineUrl>
</item>
...
</ArrayList>

Survey​

URL: https://TODO_FLOW_HOST/import/surveys?importerId=TODO_REPLACE_WITH_IMPORTER_ID

info

In order to use surveys you have to enable enableSurvey in the System Configuration.

Body​

fieldtypedescription
idStringUnique identifier of the survey.
courseIdsString[]Course ids on which survey should be shown for each event.
itemsobject[]Questions for survey.
items.idStringId of the question.
items.optionalboolean?If true question is optional.
items.typeobjectQuestion which can be different type.
items.type.questionobjectMap of language to localised question. Currently supported are en, de and si. en is required.
items.type.@classStringEither Freetext or Choice. Based on this other values in type are defined.
items.type.placeholderString?Only when @class is Freetext. Map of language to localised placeholders. Currently supported are en, de and si.
items.type.multipleChoiceboolean?Only when @class is Choice. If true user can select multiple options in question.
items.type.otherOptionboolean?Only when @class is Choice. If true user can input a custom String if none of the options fit.
items.type.optionsobject[]?Only when @class is Choice. Options for user to select.
items.type.options.idString?Only when @class is Choice. Id of the answer.
items.type.options.valueobject?Only when @class is Choice. Map of language to localised answer. Currently supported are en, de and si. en is required.

Example Request​

POST https://TODO_FLOW_HOST/import/surveys?importerId=TODO_REPLACE_WITH_IMPORTER_ID
content-type: "application/json"
session-token: "TODO_REPLACE_WITH_SESSION_TOKEN"

[
{
"id": "demoSurvey1",
"courseIds": [
"course-0",
"course-1"
],
"items": [
{
"id": "1",
"type": {
"@class": "Choice",
"question": {
"en": "How satisfied are you with the course?",
"de": "Wie zufrieden sind Sie mit dem Kurs?",
"si": "Kako zadovoljni ste s predmetom?"
},
"options": [
{
"id": "1",
"value": {
"en": "Very satisfied",
"de": "Sehr zufrieden",
"si": "Zelo zadovoljen"
}
},
{
"id": "2",
"value": {
"en": "Satisfied",
"de": "Zufrieden",
"si": "Zadovoljen"
}
},
{
"id": "3",
"value": {
"en": "Neutral",
"de": "Neutral",
"si": "Neodločen"
}
},
{
"id": "4",
"value": {
"en": "Dissatisfied",
"de": "Unzufrieden",
"si": "Nezadovoljen"
}
},
{
"id": "5",
"value": {
"en": "Very dissatisfied",
"de": "Sehr unzufrieden",
"si": "Zelo nezadovoljen"
}
}
],
"multipleChoice": false,
"otherOption": false
},
"optional": false
},
{
"id": "2",
"type": {
"@class": "Freetext",
"question": {
"en": "Anything to add about the course?",
"de": "Ist noch etwas zum Kurs zu sagen?",
"si": "Želiš kaj dodati o predmetu?"
},
"placeholder": {
"en": "Your feedback",
"de": "Ihr Feedback",
"si": "Vaše povratne informacije"
}
},
"optional": true
}
]
},
...
]

XML​

XML is not supported for surveys.


If something is missing or unclear, please contact us.