This API is no longer supported. Parts of it no longer works. (Going away!)

with comments

Best effort JSON API with absolutely no QoS guarantees.

Data is fetched from official databases/services, and ends up here as JSON. Cache information (freshness) is appended to the dataset by the API. For easier debugging, JSONView for Firefox and Chrome is recommended.

Campuses

In list mode no input is needed, and datasets for all campuses are returned. In filter mode a filter is taken as input, and dataset for a single campus is returned.

/fdv/campuses[/<filterName>:<filterValue>]
FilterDescription
idUnique campus ID from Lydia.
nr"Pretty" number for the campus.

Exampel queries: /fdv/campuses, /fdv/campuses/nr:3 or /fdv/campuses/id:51

Buildings

In list mode no input is needed, and datasets including wings and floors for all buildings are returned. In filter mode a filter is taken as input, and full dataset (also including rooms) for a single building is returned.

/fdv/buildings[/<filterName>:<filterValue>]
FilterDescription
idUnique building ID from Lydia.
nr"Pretty" number for the building. May contain letters and hyphens.

Exampel queries: /fdv/buildings, /fdv/buildings/id:7 or /fdv/buildings/nr:2-240

Rooms

In list mode no input is needed, and datasets for all rooms are returned. It is strongly recommended not to query the full room list repeatedly client-side, as the file size is close to 4 MB. In filter mode a filter is taken as input, and full datasets for one or multiple rooms are returned.

/fdv/rooms[/<filterName>:<filterValue>]
FilterDescription
idUnique room ID from Lydia. Returns a single room.
lydiacodeConcatenation of building- and room number, used e.g. in romres.ntnu.no. Returns a single room.
buildingidUnique building ID from Lydia. Returns multiple rooms from the building.
buildingnr"Pretty" building number, may contain letters and hyphens. Returns multiple rooms from the building.

Exampel queries: /fdv/rooms, /fdv/rooms/buildingid:7, /fdv/rooms/buildingnr:2-240, /fdv/rooms/lydiacode:8103303 or /fdv/rooms/id:4553

Technical details

Same Origin Policy/JSONP

Since the same origin policy normally stops JSON objects from being loaded across different domains, all APIs support the use of a callback URL parameter.

The value of the parameter will be the name of the callback function in the JSONP reply.

<api url>?callback=<name of callback>

Example query: /course/tma4105?callback=foo

jQuery, MooTools and Dojo usage examples

Language (where applicable)

Specifying the language is optional. If set, it must be either "en" or "no". If left out language settings defaults to "no".

Terms of use

This service is built to allow the creation of new and exciting services/mash-ups, by students and other university related persons/activities. At the moment we don't enforce a specific license, but we expect you to share your idéas in the same spirit. (Creative Commons, GPL, ODbL, etc)

Kardemommeloven applies. Don't DoS-attack the server with lots of requests at once. Use local caches and don't invalidate it all at once.

Don't expect 24/7 support. If this page makes no sense to you, your time is probably better spent elsewhere.

The terms may be altered in case of abuse.

Disclaimer

We aim to present valid, official NTNU data. However, due to a (self-enforced) 7 day cache time, irregular updates, endless possibilities of minor errors in a database outside our control, etc etc etc, we offer no guarantees.

Use at your own risk, and please report errors.

Comments/discussion

Statistics

Statistics Chart built using pChart.

Service operated by IME faculty, NTNU Report API errors