User Tools

Site Tools


numishare:get

Get API

The Get API is located at the apis/get pipeline (e.g., http://numismatics.org/ocre/apis/get) in Numishare. There are two required URL parameters: id and format. The id attribute corresponds to the Solr document id (which in turn corresponds to the nudsHeader/nudsid of the record. The format parameter defines the response format of the query. In some cases, an option mode parameter is required to distinguish multiple data models under the same mime-type (e.g., Pelagios-compliant annotations in RDF/XML and CIDOC-CRM RDF/XML).

Response Formats

XML

KML

KML representation of the object, whether physical or conceptual coin or hoard: http://numismatics.org/ocre/apis/get?id=ric.1%282%29.aug.1a&format=kml

JSON

Currently, the output model with the json parameter provides geographic metadata about the record in the JSON format required by TimeMap. The mode parameter may be applied eventually to respond with different flavors of JSON. The TimeMap-compliant JSON is used to render maps and timelines of coin hoards in Numishare. Example: http://numismatics.org/ocre/apis/get?id=ric.1%282%29.aug.1a&format=json

RDF

The RDF format currently corresponds to RDF/XML. The mode parameter is used to differentiate between two data models. The 'cidoc' value for mode (default) will deliver the record in CIDOC-CRM RDF/XML adhering to the British Museum's templates for coins. This feature has not yet been developed. If the mode URL parameter has not been set when querying the API, 'cidoc' will be the default.

Pelagios Annotations

The alternate mode value is 'pelagios,' which will provide the record in the form of an oac:Annotation which includes references to Pleiades URIs. See below: http://numismatics.org/ocre/apis/get?id=ric.1%282%29.aug.1a&format=rdf&mode=pelagios

<rdf:RDF xmlns:dcterms="http://purl.org/dc/terms/" xmlns:gml="http://www.opengis.net/gml/"
         xmlns:georss="http://www.georss.org/georss"
         xmlns:atom="http://www.w3.org/2005/Atom"
         xmlns:gx="http://www.google.com/kml/ext/2.2"
         xmlns:skos="http://www.w3.org/2004/02/skos/core#"
         xmlns:oac="http://www.openannotation.org/ns/"
         xmlns:owl="http://www.w3.org/2002/07/owl#"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <oac:Annotation rdf:about="http://numismatics.org/ocre/pelagios.rdf#ric.1(2).aug.1a">
      <dcterms:title>RIC I (second edition) Augustus 1a</dcterms:title>
      <oac:hasBody rdf:resource="http://pleiades.stoa.org/places/256155#this"/>
      <oac:hasTarget rdf:resource="http://numismatics.org/ocre/id/ric.1(2).aug.1a"/>
   </oac:Annotation>
</rdf:RDF>
numishare/get.txt · Last modified: 2012/11/19 20:49 by egruber