Versions Compared

Key

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

Table of Contents

Introduction 

The MyTimeTable API allows you to

Table of Contents

Introduction 

The MyTimeTable API allows you to retrieve timetables and alter user's MyTimetable profiles. Most of the data in MyTimetable can be accessed using the API, and the possibilities are expanded continuously. The API is based on REST principles, and is currently on version 0. Requests can be done using the various available HTTP verbs (GET, POST, PUT and DELETE).

...

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. 

...

/timetables/{key}/options    (since MyTimetable 3.1)

MethodGET

Description: Query the available options for the specified timetable. These options can be set on the subscription using the PUT call on a subscription. The allEquivalent boolean in the output will be true if any choice of options results in the same timetable.

...

/timetables/{parent}/{key}/options    (since MyTimetable 3.1)

MethodGET

Description: Query the available options for the specified child of a timetable. These options can be set on the subscription using the PUT call on a subscription. The allEquivalent boolean in the output will be true if any choice of options results in the same timetable.

...

Code Block
languagenone
[ 
	{
		"key":"2011!module!49CBD432F01E8C5057B344E02604A711",
        "database": "2015", 
		"description":"Basic chemical reactions",
		"childSubscriptions":[],
		"enabled":false,
		"removable":true,         "type": "pos"
	}
]

MethodDELETE

Description: Delete all subscriptions

Parameters: none

Request URL

"enabledOptions": [
            {
                "id": "3772C4D1BFA1033EDD5E0539C89DD335", 
                "name": "MODULE A - GROEP 4"
            }
        ], 
		"removable":true,
        "type": "pos"
	}
]


MethodDELETE

Description: Delete all subscriptions

Parameters: none

Request URL

Code Block
languagenone
$base_url/api/v0/subscriptions

Response code: 204 (No content)

/subscriptions/{key}

MethodPOST

Description: Add a new subscription

Parameters

NameDescriptionDefault value
key (required)
The key of the timetable you wish to add.-

Example request URL 

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!pos!0F2C927DF37F3A2BEF1F1713768E4EE6

Response code: 204 (No content)

 

MethodDELETE

Description: Delete a subscription.

Parameters

NameDescriptionDefault value
key (required)
The key of the subscription you wish to delete.-

Example request URL

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!pos!0F2C927DF37F3A2BEF1F1713768E4EE6

Response code: 204 (No content)


MethodPUT

Description: Edit a subscription. Use boolean values to trigger the subscription on or off.

Parameters

NameDescriptionDefault value
key (required)
The key of the subscription you wish to edit.-
state
Boolean value indicating the state of the subscription.false

Example request URL

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!pos!0F2C927DF37F3A2BEF1F1713768E4EE6

Response Code: 204 (No content)

/subscriptions/{key}/options     (since MyTimetable 3.1)

MethodPUT

Description: Set selected options of a subscription

Parameters

NameDescriptionDefault value
key (required)
The key of the subscription you with to set the options for.-
option (required)The id of the option, retrieved using the /timetables/{key}/options call. Can be specified multiple times. Should be specified as a form parameter.-

Example request URL 

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!pos!0F2C927DF37F3A2BEF1F1713768E4EE6/options

Response code: 204 200 (No contentOK)

...

 

MethodPOSTDELETE

Description: Add a new subscriptionClear the list of selected options of a subscription.

Parameters

NameDescriptionDefault value
key (required)
The key of the timetable subscription you wish to addwith to clear the options for.-

Example request URL URL

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!pos!0F2C927DF37F3A2BEF1F1713768E4EE60F2C927DF37F3A2BEF1F1713768E4EE6/options

Response code: 204 (No content) 

/subscriptions/{parent}/{key}

MethodDELETEPUT

Description: Delete a subscriptionEdit a subscription nested under a parent. Use boolean values to trigger the subscription on or off.

Parameters

NameDescriptionDefault value
key (required)The key of the subscription you wish to deleteedit.-
parent (required)
The key of the parent of the subscription.-
state
Boolean value indicating the state of the subscription.false

Example request URL

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!location!D2D0C6A8E334B242289FBAA7F69759C3/2011!posmodule!0F2C927DF37F3A2BEF1F1713768E4EE649CBD432F01E8C5057B344E02604A773

Response codeCode204 (No content(No content)

/subscriptions/{parent}/{key}/options     (since MyTimetable 3.1)

MethodPUT

Description: Edit a subscription. Use boolean values to trigger the subscription on or offSet selected options of a subscription nested under a parent.

Parameters

NameDescriptionDefault value
key (required)
The key of the subscription you wish to edit.-
state
Boolean value indicating the state of the subscription.false

...

with to set the options for.-
parent (required)
The key of the parent of the subscription.-
option (required)The id of the option, retrieved using the /timetables/{parent}/{key}/options call. Can be specified multiple times. Should be specified as a form parameter.-

Example request URL 

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!pos!0F2C927DF37F3A2BEF1F1713768E4EE6/646ADCA666D4A88402CA46C26A738046/options

Response Codecode204 200 (No contentOK)

...

 

MethodPUTDELETE

Description: Edit Clear the list of selected options of a subscription nested under a parent. Use boolean values to trigger the subscription on or off.

Parameters

state
NameDescriptionDefault value
key (required)
The key of the subscription you wish to editwith to clear the options for.-
parent (required)
The key of the parent of the subscription.-Boolean value indicating the state of the subscription.false

Example request URL

Code Block
languagenone
$base_url/api/v0/subscriptions/2011!locationpos!D2D0C6A8E334B242289FBAA7F69759C3/2011!module!49CBD432F01E8C5057B344E02604A7730F2C927DF37F3A2BEF1F1713768E4EE6/646ADCA666D4A88402CA46C26A738046/options

Response Codecode204 (No content)

/user

MethodGET

...

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).

...

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.

...

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.

...

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

/eventtypegroups   (since MyTimetable 3.0)

Method: GET

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

...

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

...