The Database API reference discovery

From University Map Wiki
Revision as of 15:44, 11 December 2012 by dje39 (talk | contribs) (Created page with "This page describes how the (version 6) University Map Database API can be used to navigate among geographical objects and thereby determine relevant ref codes. ==Introduction==...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This page describes how the (version 6) University Map Database API can be used to navigate among geographical objects and thereby determine relevant ref codes.

Introduction

API calls of the form

 http://map.cam.ac.uk/v6.json?ref=ref|ref|...

yield the geographical entities (buildings, sites, colleges, entrances and nonuniversity premises known to the map) with the given refs.

However, this assumes you know what the refs are.

For those buildings etc which have names, searching for them by name either with the API or the interactive map will provide the record from which its ref can be determined. But (a) colleges yield the institution not the geographical college site when looked up by name, and (b) many entities, especially entrances, do not have names at all.

Therefore, the API also provides the ability to look up all the subordinate geographical entities for some entity (the geographical entities are arranged in a hierarchy) using a wildcard and thereby determine related (and ultimately, if necessary, all) references.

Geographical entity hierarchy