VIS APIs
In order to use VIS APIs you need to set visApiSharedSecret
in System Configuration. This secret is used to
authenticate requests to VIS APIs. You put it in X-Shared-Secret
header.
Export Staff Presence
Export staff presence API is available if Check-out requests are enabled.
Request
GET https://TODO_FLOW_HOST/thirdParty/vis/exportStaffPresence
X-Shared-Secret: {{visApiSharedSecret}}
Response
field | type | description |
---|---|---|
studyYear | String | Current active study year / semester |
data | object[] | Staff presence data |
data.visEmployeeId | Int | VIS Employee ID |
data.visCourseId | Int | VIS Course ID |
data.groupName | String | Group Name |
data.executionType | String | Execution Type (Either pr , lv , sv , tv or pv , check the table below for more info) |
data.location | String | Location |
data.date | String | Date in ISO format. |
data.hours | Double | Duration in hours, rounded to 2 decimal places |
Execution types:
Execution Type in API | Execution Type | Execution Type in Slovenian |
---|---|---|
pr | Lecture | Predavanje |
lv | Laboratory exercises | Laboratorijske vaje |
sv | Seminar exercises | Seminarske vaje |
tv | Field exercises | Terenske vaje |
pv | Practical exercises | Praktične vaje |
Example:
{
"studyYear": "2024/2025",
"data": [
{
"visEmployeeId": 1,
"visCourseId": 1,
"groupName": "MAT-VS-1",
"executionType": "pr",
"location": "Room 1",
"date": "2024-10-17T15:00:00.000Z",
"hours": 1.5
}
]
}
Calculation
Lecturer presence time is calculated from their QR code shown time ranges which we save while the lecturer is showing the QR code. If those are not present, we calculate the presence time from the check-in and check-out attendance records of students, so the earliest check-in time and the latest check-out time. If those are not present, we check if there are any other attendance record types (e.g. moderator attendance) and in that case we take the start and the end of the event as the presence time.
Door Schedule
Description
This endpoint calculates door schedule entries based on the relevant event time and generates a response containing entries for each student participating in the event.
In order to use this API, the following configurations need to be set in Flow:
visDoorScheduleApiSupportedCourseTypes
visDoorScheduleApiSupportedLocations
Currently, only events that:
- are one day in the future
- have the type corresponding to the
visDoorScheduleApiSupportedCourseTypes
configuration, - have the location corresponding to the
visDoorScheduleApiSupportedLocations
configuration,
are supported.
Configurations
All configurations are found in Flow, under the "Configuration" -> "Third Party" tab in side menu.
visDoorScheduleApiSupportedCourseTypes
- A list of course types that are supported by the door schedule API.
- Values are comma-separated (e.g. VL,P,...).
- Course type is found in the courses' ID in Flow (e.g. 1-P-25 -> id-courseType-semesterName)
visDoorScheduleApiSupportedLocations
- A list of locations that are supported by the door schedule API.
- Values are comma-separated (e.g. Room 1,Room 2,...).
- Location is found in the courses' events in Flow.
Behavior
For each student participating in the event, a door schedule entry is added to the response for:
- Every 30 minutes during the event.
- The 30 minutes before the event starts.
Example Flow
If an event lasts from 10:00 AM to 12:00 PM, the door schedule entries will include:
- 9:30 AM (30 minutes before the event starts)
- 10:00 AM, 10:30 AM, 11:00 AM, 11:30 AM (every 30 minutes during the event)
Request
POST https://TODO_FLOW_HOST/thirdParty/vis/doorSchedule
X-Shared-Secret: {{visApiSharedSecret}}
Response
field | type | description |
---|---|---|
enrollmentNumber | String | Enrollment number of the student |
date | String | Date of the door opening in the format MM/DD/YYYY |
doorGroupName | String | Door group name in the following format: group{hour of the entry}-{minute of the entry} |
Example:
[
{
"enrollmentNumber": "123456789",
"date": "1/7/2025",
"doorGroupName": "group14-0"
}
]
Execution dates
Description
This endpoint returns all events associated with specific course. These event IDs can be used as input for the Presence rates by student endpoint, which requires an array of event IDs (String[]) in its request body. Together, these endpoints enable the calculation of student presence rates.
Request
POST https://TODO_FLOW_HOST/thirdParty/vis/executionDates
X-Shared-Secret: {{visApiSharedSecret}}
Request post body
field | type | description |
---|---|---|
courseCode | String | Course code from Flow |
courseType | String? | Course type (e.g. P, VL, ...) |
schoolYear | String? | School year, in which the course takes place |
Example:
{
"courseCode": "1-P-25",
"courseType": "P",
"schoolYear": "2024/2025"
}
Response
field | type | description |
---|---|---|
eventId | String | ID of the event |
startDate | String | Start datetime in ISO format |
endDate | String | End datetime in ISO format |
courseName | String | Course name |
groupName | String | Group name |
Example:
[
{
"eventId": "event-id-123",
"startDate": "2022-10-05T11:00:00.000Z",
"endDate": "2022-10-05T12:00:00.000Z",
"courseName": "Economy",
"groupName": "Group A"
}
]
Presence rates by student
Description
This endpoint calculates student presence rates for the specified events and returns a response with the corresponding presence rate data. It is designed to be used alongside the Execution dates endpoint, which provides the event IDs required as input (String[]) for this endpoint.
Request
POST https://TODO_FLOW_HOST/thirdParty/vis/presenceRatesByStudent
X-Shared-Secret: {{visApiSharedSecret}}
Request post body
field | type | description |
---|---|---|
courseType | String | Course type (e.g. P, VL, ...) |
eventIds | String[] | Array of event IDs |
minimumRequiredPresenceRate | Int | Minimum required presence rate for the course that hosts the events |
Example:
{
"courseType": "P",
"eventIds": ["event-id-123", "event-id-456"],
"minimumRequiredPresenceRate": 85,
}
Response
field | type | description |
---|---|---|
enrollmentNumber | String | Enrollment number of the student |
reachedPresenceRequirement | Boolean | Indicator, if student has reached the course's presence requirement |
presenceRate | Double | Presence rate of the student for the course |
groupName | String | Group name |
Example:
[
{
"enrollmentNumber": "123456789",
"reachedPresenceRequirement": true,
"presenceRate": 86,
"groupName": "Group A"
}
]
Presence rates by course
Description
This endpoint calculates student presence rates by course and generates a response containing the rates for each student in course.
Configurations
All configurations are found in Flow, under the "Configuration" -> "Third Party" tab in side menu.
-
visCourseIdTransformations
- CSV file, which includes the original VIS course IDs and the new VIS course IDs.
- The first column is the original VIS course ID and the second column is the new VIS course ID.
- Example CSV file:
originalId transformedId 1 2 3 4 5 6 This configuration tells the endpoint to replace ID 1 with 2, ID 3 with 4, and ID 5 with 6.
Request
POST https://TODO_FLOW_HOST/thirdParty/vis/presenceRatesByCourse
X-Shared-Secret: {{visApiSharedSecret}}
Request post body
field | type | description |
---|---|---|
schoolYear | String | School year of the courses |
courseType | String? | Course type (e.g. PR, LV, ..., defaults to LV) |
attendanceRequirementMet | Boolean? | Include only students, that meet the attendance requirement (defaults to true) |
Example:
{
"schoolYear": "2024/2025",
"courseType": "LV",
"attendanceRequirementMet": true
}
Response
field | type | description |
---|---|---|
visCourseId | String | Course ID in VIS |
requiredPresenceRate | Int | Required presence rate of the course |
courseType | String | Type of the course |
students | Student[] | Student data for the course |
student.enrollmentNumber | String | Enrollment number of the student |
student.reachedPresenceRequirement | Boolean | Indicator, if student has reached the course's presence rate requirement |
student.presenceRate | Int | Number of student's attended events for the course |
student.groupName | String | Group name |
Example:
[
{
"visCourseId": "course-id-123",
"requiredPresenceRate": 100,
"courseType": "LV",
"students": [
{
"enrollmentNumber": "123456789",
"reachedPresenceRequirement": true,
"presenceRate": 3,
"groupName": "Group A"
}
]
}
]