...
Note |
---|
...
| ||
The |
...
The resources support both JSON and XML. To switch from JSON to XML, just add .xml after the resource name in any of the request URLs.
OAuth
To set up OAuth, follow these steps:
- Visit http://demo.eveoh.nl/oauth/authorize?response_type=code&client_id=test&redirect_uri=http://localhost
- You will be prompted to log in. After logging in the application will request for your permission to access your personal timetable. Click Allow.
- After being redirected the URL will contain ?code=XXXXXX. Copy this code.
Open a Terminal window and enter the following command (replace XXXXXX with your personal code from step 3):
Code Block language none curl -d 'grant_type=authorization_code&client_id=test&client_secret=test&code=XXXXXX&redirect_uri=http://localhost' http://demo.eveoh.nl/oauth/token
- The command will return an access token. This token will allow you to request resources from the API.
Resources
/timetables
Query all timetables with a specified type.
Type: GET
Parameters
type | the type of the timetables, e.g. 'module' |
limit | the maximum amount of records returned |
offset | starting position of the records returned (e.g. offset=5 skips the first 5 records) |
departmentFilter | filter on a specific department |
posFilter | filter on a specific pos |
zoneFilter | filter on a specific zone |
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/timetables?type=module&access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
[
{
"description": "VMT for Informatics",
"value": "2011!module!49CBD432F01E8C5057B344E02604A710"
}
] |
/timetables/{key}
Query all timetables corresponding with a specific timetable.
Type: GET
Parameters
key | the key corresponding with the specific timetable |
startDate | the start date for the timetable |
endDate | the end date for the timetable |
limit | the maximum amount of records returned (default = 25) |
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/timetables/2011!module!49CBD432F01E8C5057B344E02604A710?access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
[
{
"activityDescription": "VMT for Informatics",
"activityTypeDescription": "Lecture",
"activityTypeName": "Class",
"endDate": 1341930600000,
"locations": [
{
"capacity": 18,
"id": "D2D0C6A8E334B242289FBAA7F69759C3",
"key": "#SPLUS9759C3",
"name": "B3.022"
}
],
"moduleCode": "#SPLUS04A710",
"notes": null,
"staffMembers": [
"Mr. Moore (Moo)"
],
"startDate": 1341919800000,
"studentSets": [
"BI group 1A",
"BI group 1B"
]
}
] |
/timetable
Query all timetables within a specific timerange.
Type: GET
Parameters
startDate | the start date for the timetable |
endDate | the end date for the timetable |
limit | the maximum amount of records returned |
type | the type of the timetables, e.g. 'module' |
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/timetable?startDate=2012/07/10&endDate=2012/07/10&access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
{
"activityDescription": "System biology",
"activityTypeDescription": "Lecture",
"activityTypeName": "Class",
"endDate": 1341916200000,
"locations": [
{
"capacity": 24,
"id": "D2D0C6A8E334B242289FBAA7F69759BB",
"key": "#SPLUS9759BB",
"name": "G3.104"
},
{
"capacity": 24,
"id": "D2D0C6A8E334B242289FBAA7F69759BC",
"key": "#SPLUS9759BC",
"name": "G3.110"
}
],
"moduleCode": "#SPLUS969C58",
"notes": null,
"staffMembers": [
"Mr. Martinez (Maz)",
"Ms. Adams (Ada)"
],
"startDate": 1341909000000,
"studentSets": [
"BI group 3A"
]
} |
/timetabletypes
Query all possible timetable types.
Type: GET
Parameters: none
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/timetabletypes?access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
{
"timetableType": [
"location",
"zone",
"module",
"student",
"staff",
"pos",
"posss",
"studentset",
"studentsetgroup",
"modulegroup",
"user"
]
} |
/timetablefilters
Query all filters available for a specific timetable type.
Type: GET
Parameters
type | the type of the timetable |
departmentFilter | a specific filter |
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/timetablefilters?type=pos&access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
{
"filterattribute": [
{
"option": [
{
"name": " Faculty of Informatics",
"value": "646ADCA666D4A88402CA46C26A73803C"
},
{
"name": " Faculty of Law",
"value": "646ADCA666D4A88402CA46C26A738046"
}
],
"type": "department"
}
]
} |
/databases
Query the available databases.
Type: GET
Parameters: none
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/databases?access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
{
"database": [
"2011"
]
} |
/weeklabels
Query the weeklabels.
Type: GET
Parameters: none
Request URL
Code Block | ||
---|---|---|
| ||
http://demo.eveoh.nl/api/v0/weeklabels?access_token=your_token |
Response Body
Code Block | ||
---|---|---|
| ||
{
"value": "23",
"week": 11223
} |
...
API documentation has been moved to our developer portal and is now available at https://developer.mytimetable.net/apis/mytimetable/. The documentation for our provisioning API is currently still available at Provisioning API. |
Demo API authentication details
Base URL | https://demo.mytimetable.net/ |
---|---|
API version(s) | v0 (/api/v0) |
Timetable types | studentset, module, staff, location |
Token required | Yes (apiToken: testToken) |
OAuth available | Yes (client_id: test, client_secret: test, redirect_uri: http://localhost) |
OAuth authorization URL | https://demo.mytimetable.net/oauth/authorize |
OAuth token URL | https://demo.mytimetable.net/oauth/token |
This is a demo MyTimetable site which can be used for testing purposes.