Schema API, version 2 draft 2
Included social and provides social calendar / schedule events. These are based on the schedule system's events where applicable but may be have enhanced titles etc.
This version is very similar to the first but breaks some things providing titles and urls where possible.
RESTful API - access over HTTP(S), arguments and results JSON
encoded, errors in HTTP statuses.
Fetch schema
- URL (GET): .../api/schema/v2/course/<coursecode>/<startterm>/<courseroundcode>
- URL (GET): .../api/schema/v2/course/<coursecode>
- the url uses
- coursecode is a Ladok course code, eg SF1624
- startterm is a Ladok start term in YYYY(VT|HT) format
- courseroundcode is a Ladok course round code
- query parameters can optionaly contain
- startTime - as YYYY-MM-DD. Defaults to now
- endTime - as YYYY-MM-DD. Defaults to now + 7days
- type - as [TEN|all]. Defaults to all types. Should be used for large time ranges.
- JSON result:
{
url,
entries[
{url,
start,
end,
title,
type,
type_name {
sv,
en
},
locations[
{name,
url}
]}
]}
- {} denotes JSON object
- [] denotes a JSON array
- start and end are times are YYYY-MM-DD MM:HH:SS without time zone (local time Stockholm)
- url points to where the user can get more details on the requested course or courserrounds calendar
- entry.url points to where the user can get more details on the activity/event
- location.url points to where the user can get more details on the room, can be missing if no detailed information is available
- Some known examples of type are: Ten ,Frl ,Ovn, KS, Sem
Check status
- URL (GET): .../api/schema/v2/status
Check the status of the schema server, including if it can query the schedule server.
- JSON result:
{status,
}
- {} denotes JSON object
- status is a string. If all is well, it starts with "ok".
On failure to connect to the schedule server (eg timetable api), a HTTP error is returned.