TSO's Linked Data APIs offers a way for developers to leverage their existing skills with the RDF data model. There is no need to learn the SPARQL query language. It provides a familiar RESTful interface over the data with several choices of output format.
TSO have created a Java version of the API specification. This is open source.
Currently there are APIs for the following datasets:
If you follow the links above you will find some more information on the individual APIs.
An item endpoint will return information about a single resource, whilst list endpoints return up to 50 results at once.
To change the number of results use the _pageSize parameter.
To go to the next page of results, use the _page parameter.
As an example:
If you want to return a more specific set of results than the endpoints provide, there are several options.
Different properties of a resource can be retrieved using various viewers. A viewer is used to construct an RDF graph based on some or all of the properties of those resources selected. Based on the viewer type different properties of the resources will be retrieved.
Viewers can be invoked in the following ways:
The names of a viewer carries little meaning other than being a hint as to the level of information that the viewer returns.
You can also add additional properties to the output with the _properties parameter:
Besides RDF/XML (which is the default return format), turtle and JSON formats are also available by appending .ttl or .json to the URI, as in the following examples:
Alternatively the _format parameter can be used as in the following examples:
The system utilises content negotiation by default. The available formats are RDF/XML, JSON, Turtle and XML.
|Required Format||Accept Header MIME type|