Import Entities
/// Maybe add some general description of this page
User
URL: https://TODO_FLOW_HOST/import/users?importerId=TODO_REPLACE_WITH_IMPORTER_ID
All sample data for the User entity use the value flowdemo123
to calculate the passwordOrHash property.
Body
field | type | description |
---|---|---|
id | String | Unique identifier of the user. |
firstName | String | First name of the user. |
lastName | String | Last name of the user. |
username | String? | If set, this can be used to log in instead of the email. |
studentEmail | String? | Can be used to log in and is used to send email notifications to the user. |
staffEmail | String? | Can be used to log in and is used to send email notifications to the user. |
campusManagementRoles | String[]? | Roles of the user within the campus management system. Used for the role mapping. Also see the role mapping settings in Flow. |
passwordOrHash | String? | Hashed or plaintext password. If hashed then passwordPreHashing must be specified. See documentation of the DatabasePasswordLoginProvider for security considerations. |
passwordPreHashing | object? | 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.algorithm | String | Hashing algorithm that is used. For available options, see DatabasePasswordLoginProvider documentation. |
passwordPreHashing.saltMode | String | Salt mode to use. For available options, see DatabasePasswordLoginProvider documentation. |
passwordPreHashing.salt | String? | Salt that is used. Use null if saltMode is NONE . |
passwordPreHashing.hmacKey | String? | The Hmac key that is used. Only needed if algorithm specifies a Hmac algorithm. |
passwordPreHashing.pbeInfos | object? | Configuration for the PBE algorithm. Only needed if algorithm specifies a PBE algorithm. |
passwordPreHashing.pbeInfos.iterationCount | int | Iteration count used for PBE. |
passwordPreHashing.pbeInfos.keyLength | int | Key length used for PBE. |
Example Request
JSON (recommended)
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
field | type | description |
---|---|---|
userId | String | Unique identifier of the associated user. |
matriculationNumber | String? | Matriculation number of the student. |
courses | object[]? | Courses the student is registered for. |
courses.courseId | String | Unique identifier of the course. |
courses.groupId | String | Unique identifier of the group within the course. |
courseIdsWithCustomGroupRegistration | String[]? | Unique identifiers of courses where the student has to register to a group by themselves. |
studyProgram | String? | Name of the study program of the student. |
Example Request
JSON (recommended)
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
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
field | type | description |
---|---|---|
id | String | Unique identifier of the organization. |
name | String | Display name of the organization. |
moderatorUserIds | String[] | Unique identifiers of users which have moderator access to this organization. |
msTeamsModeratorUserIds | String[]? | Unique identifiers of users which have moderator access for the Microsoft Teams plugin. |
Example Request
JSON (recommended)
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
field | type | description |
---|---|---|
id | String | Unique identifier of the course. |
organizationId | String | Unique identifier of the organization the course belongs to. |
number | String | Internal number of the course. |
name | String | Display name of the course. |
semester | String | Unique identifier of the semester which the course belongs to (see Semesters-Configuration in Flow). |
requiredPresenceRate | int? | Presence rate that is required to pass the course (0 - 100). Defaults to the defaultPresenceRate set in the System Configuration. |
groupRegistrationStartDate | Date? | 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.) |
groupRegistrationEndDate | Date? | End date and time for the group registration. (When imported, the value cannot be changed in the Course Settings.) |
menuLinks | object[]? | List of links which should be shown on the course page. |
menuLinks.title | String | Title of the link to be displayed. |
menuLinks.description | String | Description for the link/action. Will be shown beneath the title or when hovering the button. |
menuLinks.url | String | The URL to open on click. Can be a URL to a Flow HTML module or to an external system. |
menuLinks.inline | boolean | If true a button will be shown in the top bar. Otherwise, the item will be shown in the 3-dot menu. |
autoApproveAttendanceRequests | boolean? | If true attendance requests will be auto approved when requested by the student and can be later denied by moderators. |
attendanceRequestDeadlineDays | int? | If set it overwrites attendanceRequestDeadlineDays in the System Configuration for the particular course. |
Example Request
JSON (recommended)
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
field | type | description |
---|---|---|
id | String | Unique identifier of the group. |
name | String | Display name of the group. |
courseId | String | Unique identifier of the course which the group belongs to. |
sizeLimit | int? | 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.) |
lecturerUserIds | String[] | Unique identifiers of the users which are lecturers for this group of the course. |
Example Request
JSON (recommended)
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
field | type | description |
---|---|---|
id | String | Unique identifier of the event. |
start | Date | Start date and time of the event. |
end | Date | End date and time of the event. |
location | String? | Location where the event takes place. |
teachingUnits | int? | Number of teaching units. Used for the presence rate calculation. |
courseId | String | Unique identifier of the course which this event belongs to. |
groupId | String | Unique identifier of the group which this event belongs to. |
type | String? | Use ONLINE_TEAMS for events that should be synced with the Microsoft Teams Plugin. (Only relevant for the MS Teams Plugin) |
lecturerUserId | String? | Unique identifier of the user which is a lecturer for this event. |
Example Request
JSON (recommended)
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
In order to use surveys you have to enable enableSurvey
in the System Configuration.
Body
field | type | description |
---|---|---|
id | String | Unique identifier of the survey. |
courseIds | String[] | Course ids on which survey should be shown for each event. |
items | object[] | Questions for survey. |
items.id | string | Id of the question. |
items.optional | boolean? | If true question is optional. |
items.type | object | Question which can be different type. |
items.type.question | object | Map of language to localized question. Currently supported are en , de and si . en is required. |
items.type.@class | string | Either Freetext or Choice . Based on this other values in type are defined. |
items.type.placeholder | string? | Only when @class is Freetext . Map of language to localized placeholders. Currently supported are en , de and si . |
items.type.multipleChoice | boolean? | Only when @class is Choice . If true user can select multiple options in question. |
items.type.otherOption | boolean? | Only when @class is Choice . If true user can input a custom string if none of the options fit. |
items.type.options | object[]? | Only when @class is Choice . Options for user to select. |
items.type.options.id | string? | Only when @class is Choice . Id of the answer. |
items.type.options.value | object? | Only when @class is Choice . Map of language to localized answer. Currently supported are en , de and si . en is required. |
Example Request
JSON (recommended)
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.