Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Introduction 

...

Input can be provided in the form of HTTP GET URL parameters (which should be URL encoded properly) or an HTTP POST/PUT body that is in application/x-www-form-urlencoded. Most parameters are optional, when this is not the case this is mentioned in the documentation. Dates and times can be specified in one of the following format:

  • 'today' or 'tomorrow' for the current or next day at 0:00;
  • Unix timestamp format (in milliseconds sinds 1970, so don't forget to multiply/divide by 1000);
  • ISO 8601 format (yyyy-MM-ddTHH:mm:ss±HH:mm): elements on the right side (time, time zone) are optional;
  • Legacy format (yyyy/MM/dd HH:mm): the time is optional.

Authentication and authorisation

...

Code Block
languagenone
{
    "timetableType": [
        "location", 
        "zone", 
        "module", 
        "student", 
        "staff", 
        "pos", 
        "posss", 
        "studentset", 
        "studentsetgroup", 
        "modulegroup", 
        "user",
		"tag"
    ]
}

/timetabletypesdetails   (since MyTimetable 3.0)

MethodGET

Description: Query all possible timetable types and return them including some details regards naming, whether or not they can include child timetables and their ordering in the menus. 

...

Response Code: 204 (No content)

/user

MethodGET

Description: Query information on the current user. Currently this returns the username and the iCalendar feed URL for the current user.

MethodParametersGETParameters: nonenone

Request URL

Code Block
languagenone
$base_url/api/v0/user

...

Code Block
languagenone
{
    "feedUrl": "http://myuniversity/ical?eu=FKW92Fawier&t=556cf8a1-704a-4997-bc4d-5acf395eccaf",
    "username": "testuser"
}

/weeklabels   (deprecated since MyTimetable 2.7, replaced by: /weeklabelmaps)

Method: GET

Description: Query the weeklabels. This provides custom labels for the weeks when available. The response includes a value (the custom label) and a week (year - 1900 + the ISO week number).MethodGET

Parameters: none

Request URL

...

Code Block
languagejs
{
    weeklabel: [
        {
            "week": 11223,
            "value": "23"
        },
        {
            "week": 11224,
            "value": "24"
        }
    ]
}

/weeklabelmaps   (since MyTimetable 2.7)

MethodGET

Description: Query the weeklabel maps. This provides the available maps with custom labels for the weeks. Per weeklabel map, the response includes a key and a boolean which indicates whether the map is the default weeklabel map for the requested user.

MethodGET

Parameters: none

Request URL

...

Code Block
languagejs
{
    "weeklabelmaps": [
        {
            "key": "SYLLABUS",
            "isDefault": true
        }
    ]
}

/weeklabelmaps/{key}   (since MyTimetable 2.7)

MethodGET

Description: Retrieve the specified weeklabel map. This provides the key, a boolean which indicates if this is the default weeklabel map for the requested user and the actiual map with custom labels for the weeks.

MethodGET

Parameters

NameDescriptionDefault value
key (required)
The key of the weeklabel you wish to retrieve.-

Request Example request URL

Code Block
languagenone
$base_url/api/v0/weeklabelmaps/SYLLABUS

...

Code Block
languagejs
{
    "key": "SYLLABUS",
    "isDefault": true,
    "weeklabels": [
        {
            "year": 2014,
            "week": 4,
            "description": "wk 4"
        },
        {
            "year": 2014,
            "week": 5,
            "description": "wk 5"
        }
    ]
}

/databases

MethodGET

Description: Query the available datasources, see API Documentation for more information.MethodGET

Parameters: none

Example request Request URL

Code Block
languagenone
$base_url/api/v0/databases

...

Code Block
languagenone
{
    "database": [
        "2011"
    ]
}

/eventtypegroups   (since MyTimetable 3.0)

Method: GET

Description: Query  Query the event type groups and event filtering settings.

Method: GET

Parameters: none

Example request Request URL

Code Block
languagenone
$base_url/api/v0/eventtypegroups

...

Code Block
languagenone
{
  "filteringEnabled": true,
  "eventtypegroups": [
    {
      "id": "Excursie",
      "description": "Excursie",
      "isFilteredByDefault": false,
      "isFiltered": false,
      "isFilteredForSync": false
    },
    {
      "id": "Hoorcollege",
      "description": "Hoorcollege",
      "isFilteredByDefault": false,
      "isFiltered": false,
      "isFilteredForSync": false
    },
    {
      "id": "Other",
      "description": "Other",
      "isFilteredByDefault": false,
      "isFiltered": false,
      "isFilteredForSync": false
    }
  ]
}

 

Method: PATCH

Parameters: none

Request URL

Code Block
languagenone
$base_url/api/v0/eventtypegroups

Request Content-Type

application/x-www-form-urlencoded

Example request body

Code Block
languagenone
eventTypeGroups%5BExcursie%5D%5BisFiltered%5D=true&eventTypeGroups%5BHoorcollege%5D%5BisFiltered%5D=false&eventTypeGroups%5BOther%5D%5BisFiltered%5D=false

Decoded example request body

Code Block
languagenone
eventTypeGroups[Excursie][isFiltered]=true
eventTypeGroups[Hoorcollege][isFiltered]=falseeventTypeGroups[Other][isFiltered]=false

Response code

204 (No content), 403 (Forbidden) if filtering is disabled.