UniTime Exports | |
UniTime Version: 4.4.91 | |
Last Updated: April, 2019 |
Export calls can use HTTP-simple authentication with a user created using the UniTime’s Users page, or if enabled (by setting the application property unitime.api.canUseToken to true) it can authenticated via an API token. The API token can be passed as an additional attribute (named token) on any export call. The user must have a default role with the appropriate export permission (in general, the user must have the same permissions as to be able to do the export in UniTime). The API token is available on the Users page (when enabled), it is computed using the username and hashed password (changing password will also change the API token for a user).
All export are using the export servlet (e.g., GET UniTime/export?output=<format>
), with the mandatory output parameter specifies the type and format of the export. Additional parameters based on the export may be provided. Most exports require to specify the academic session at the very least (sid parameter containing unique id of the academic session or term parameter containing <term><year><initiative>
, e.g., Fal2010woebegon; the initiative can be omitted if there is only one initiative for the given term and year, e.g., Fal2010).
When a CSV is being exported csvDelimiter and csvQuotation parameters can be used to define delimiter and quotations in the resultant file.
The UniTime events can be exported in iCalendar, CSV, or PDF format. The following outputs are allowed:
The URL has to have a type parameter specified, which could be:
If type is not room, the resource has to be specified either using its UniTime unique id (id parameter), by its external id (ext parameter for room and person), or by its reference (name parameter for all types but room and person).
Event unavailabilities can be included by adding setting the ua parameter to 1.
CSV and PDF exports can define which columns are to be included (flags parameter, set to -1 for all columns) and how the table is to be sorted (sort parameter, containing index of the column starting with 1, negative index for descending order). The flags parameter is a sum of the following bits:
The exported events / meetings can be filtered down by any mean that could be used in the Event Filter and Room Filter components. In general, all chips of the event filter are prefixed with e: (e:text is the remaining text, if present) and all chips of the room filter are prefixed with r: (r:text is the remaining text, if present). Here are a few examples:
Tip: use locale=en_UK for having the times in 24h format and dates in the (day.month.year format).
Example iCalendar schedule for a student with external id 1001
All events in EDUC 101 of the current academic session in CSV format:
https://demo.unitime.org/UniTime/export?output=events.csv&type=room&r:text=EDUC+101&flags=-1
All examination meetings in EDUC 101 of the given academic session in PDF format:
Class schedule of the first year of A/M1 curriculum
The HQL reports can be exported form UniTime in CSV format using output=hql-report.csv, or JSON format using output=hql-reports.json. These are, for instance, the reports available on the Courses > Reports page. HQL appearance and admin-only permissions are checked (the user must have the appropriate permissions to be able to get the report).
The report parameter can contain name of the report or its unique id. Individual report parameters can be looked up, for example:
The following example returns results of the New Courses report for ALG and BIOL subject areas on our online demo:
The rooms, room groups and room features can be exported in CSV or PDF format, based on the output parameter:
Same as in the events, the room filter parameters can be included in the URL, with the r: prefix.
The departments can be exported in the following format (based on the dm parameter):
The table can be sorted by any column using sort parameter (contain index of the column, starting from 1, negative numbers for descendant order).
The flags parameter can be used to define which columns are to be included in the exported table. The orientation can be used to define how the room sharing is to be exported (it can contain text, vertical, or horizontal). Parameter mode can be used to select which of the available modes is to be used for the room sharing grid (e.g., Workdays × Daytime). Parameter department can be used to select department (contains department code).
The flags parameter can contain a combination of the following columns:
Examples:
The student scheduling reports can be exported from the Online Student Scheduling Reports page (when output=sct-report.csv&online=true), from the Student Sectioning Solver Reports (when output=sct-report.csv&online=false
for the solver of the user running the export, or the from the published solver when online parameter is not used).
Example:
curl -u admin:admin "https://demo.unitime.org/UniTime/export?output=sct-report.csv&name=TABLEAU_REPORT&term=Fal2010&online=true&pritify=false"
Parameter pritify=false
will tell UniTime to avoid putting blank spaces on repeating cells.
Available reports are listed in the SectioningReportTypesBackend.ReportType enum.
Back to UniTime Online Documentation | © UniTime 2024 | Content available under GNU Free Documentation License 1.3 |