Query API documentation
Usage Examples
A YouTube item
http://uriplay.org/doc.rdf.xml?uri=http%3A//www.youtube.com/watch%3Fv%3DpliAz4L-sAQ
A podcast
http://uriplay.org/doc.rdf.xml?uri=http%3A//downloads.bbc.co.uk/podcasts/radio4/today/rss.xml
A list of podcasts, as an RSS feed
http://uriplay.org/list.rss?uri=http%3A//uriplay.org/download/samples/itunes-example.opml
A Wikpedia item
http://uriplay.org/list.rss?uri=http%3A//en.wikipedia.org/wiki/The_West_Wing
Items involving a person, as an RSS feed
http://uriplay.org/list.rss?uri=http%3A//en.wikipedia.org/wiki/Aaron_Sorkin
A list of items mentioned in the Twitter search for 'funny':
http://uriplay.org/doc.rdf.xml?uri=http%3A//search.twitter.com/search.atom%3Fq%3Dfunny
Synopsis
http://uriplay.org/<graph>[.<format>]?uri=<resource>[&profile=<profile>]
Description
A URIplay endpoint allows clients to query metadata for playable resources using any known name (URI) for the resource. Clients may choose to have their results formatted in a variety of serialisations (eg. JSON, RDF, ATOM, RSS). They may also specify, to a limited extent, which related resources they would like included in the results.
URIplay enpoints intend to make four types of information accessible to clients:
- Human readable data intended to allow clients to present a simple description of the resource in their user interface (eg. dc:title, dc:description, etc).
- Media focused metadata intended to allow clients to determine how to locate and play a given resource, and, where alternatives exist, choose the most appropriate way to access a resource.
- Alternate and common names for a resource, any of which may be used to identify the resource in a query.
- Taxonomies and various creative relationships (creator, cast member, producer, etc) presented as simple collections of resources - intended to make these relationships accessible to players without passing on the burden of interpretation.
To satisfy a clients query, the URIplay endpoint will query a number of known, common sources of metadata, and will also apply a set of simple rules - for example, is the resource URI retrievable via a known protocol and does it return metadata that we understand. It then aggregates, and possibly caches, the known metadata for a given resource and returns it in the serialization requested.
Note: Some metadata may be discarded if it cannot be included in the serialisation requested.
In more formal terms, a URIplay endpoint, returns both a set of attributes for the requested resource name and a graph of resources that are related to it.
The URIplay query API responds only to HTTP GET requests.
Parameters
resource |
Specifies the name (URI) of the resource being queried. The URI may be any name by which the resource is known. |
||||||||||||||
graph |
Select one from a set of predefined criteria, restricting the related resources that should be included in the returned graph, according to the type of the connecting relationship. The
|
||||||||||||||
format |
Specifies the serialisation format of the result. The
If unspecified, user agents may specify a preference through an 'Accept' HTTP header. Default value: application/rdf+xml |
||||||||||||||
profile |
Select one from a set of predefined criteria, restricting the resources that should be included in the returned graph, according to the values of their attributes. The profiles typically restrict resources to property ranges required by particular devices. The
Default value: all |
Prefixes
This documentations uses the following prefixes to refer to the corresponding namespaces:
| play | http://uriplay.org/elements/ |
| po | http://purl.org/ontology/po/ |
| dcterms | http://purl.org/dc/terms/ |
Usage Examples
Retrieve resources from the Twitter search for YouTube.com:
http://uriplay.org/doc.rdf.xml?uri=http%3A//search.twitter.com/search.atom%3Fq%3DYouTube.com
Error Codes
| 404 | Unable to retrieve source document. |
| 406 | Unable to format the resulting graph in the serialisation requested. |