Skip to main content

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

fieldtypedescription
studyYearStringCurrent active study year / semester
dataobject[]Staff presence data
data.visEmployeeIdIntVIS Employee ID
data.visCourseIdIntVIS Course ID
data.groupNameStringGroup Name
data.executionTypeStringExecution Type (Either pr, lv, sv, tv or pv, check the table below for more info)
data.locationStringLocation
data.dateStringDate in ISO format.
data.hoursDoubleDuration in hours, rounded to 2 decimal places

Execution types:

Execution Type in APIExecution TypeExecution Type in Slovenian
prLecturePredavanje
lvLaboratory exercisesLaboratorijske vaje
svSeminar exercisesSeminarske vaje
tvField exercisesTerenske vaje
pvPractical exercisesPraktič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

fieldtypedescription
enrollmentNumberStringEnrollment number of the student
dateStringDate of the door opening in the format MM/DD/YYYY
doorGroupNameStringDoor 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

fieldtypedescription
courseCodeStringCourse code from Flow
courseTypeString?Course type (e.g. P, VL, ...)
schoolYearString?School year, in which the course takes place

Example:

{
"courseCode": "1-P-25",
"courseType": "P",
"schoolYear": "2024/2025"
}

Response

fieldtypedescription
eventIdStringID of the event
startDateStringStart datetime in ISO format
endDateStringEnd datetime in ISO format
courseNameStringCourse name
groupNameStringGroup 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

fieldtypedescription
courseTypeStringCourse type (e.g. P, VL, ...)
eventIdsString[]Array of event IDs
minimumRequiredPresenceRateIntMinimum required presence rate for the course that hosts the events

Example:

{
"courseType": "P",
"eventIds": ["event-id-123", "event-id-456"],
"minimumRequiredPresenceRate": 85,
}

Response

fieldtypedescription
enrollmentNumberStringEnrollment number of the student
reachedPresenceRequirementBooleanIndicator, if student has reached the course's presence requirement
presenceRateDoublePresence rate of the student for the course
groupNameStringGroup 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:
    originalIdtransformedId
    12
    34
    56

    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

fieldtypedescription
schoolYearStringSchool year of the courses
courseTypeString?Course type (e.g. PR, LV, ..., defaults to LV)
attendanceRequirementMetBoolean?Include only students, that meet the attendance requirement (defaults to true)

Example:

{
"schoolYear": "2024/2025",
"courseType": "LV",
"attendanceRequirementMet": true
}

Response

fieldtypedescription
visCourseIdStringCourse ID in VIS
requiredPresenceRateIntRequired presence rate of the course
courseTypeStringType of the course
studentsStudent[]Student data for the course
student.enrollmentNumberStringEnrollment number of the student
student.reachedPresenceRequirementBooleanIndicator, if student has reached the course's presence rate requirement
student.presenceRateIntNumber of student's attended events for the course
student.groupNameStringGroup name

Example:

[
{
"visCourseId": "course-id-123",
"requiredPresenceRate": 100,
"courseType": "LV",
"students": [
{
"enrollmentNumber": "123456789",
"reachedPresenceRequirement": true,
"presenceRate": 3,
"groupName": "Group A"
}
]
}
]