Skip to main content

Import Entities

/// Maybe add some general description of this page

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 program 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 organizations concept, you still have to create one root/default organization to attach all courses to that single organization.

Body

fieldtypedescription
idStringUnique identifier of the organization.
nameStringDisplay name of the organization.
moderatorUserIdsString[]Unique identifiers of users which have moderator access to this organization.
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 organization the course belongs to.
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.
teachingUnitsint?Number of teaching units. Used for the presence rate calculation.
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.

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+0",
"location" : "Online",
"teachingUnits" : 3,
"courseId" : "course-0",
"groupId" : "group-1",
}, ...
]

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>
</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 localized 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 localized 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 localized 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.