Documentation

This page contains documentation for using web services provided by Nomisma and how to access machine readable serializations through REST and content negotiation.

APIs

API XML JSON Turtle
avgAxis XML JSON
avgDiameter XML JSON
avgWeight XML JSON
closingDate XML JSON
getLabel XML JSON
getRdf RDF/XML JSON-LD RDF/TTL

Average Axis

Get average axis for given SPARQL query.
Webservice Type : REST
Url : nomisma.org/avgAxis?
Parameters : constraints (following predicate - object format. multiple contraints separated by ' AND '. See examples below), format ('json' or 'xml', default 'xml')
Result : returns a decimal number in a response wrapper.
Examples: http://nomisma.org/apis/avgAxis?constraints=dcterms:source nm:ric AND nmo:hasMint nm:rome AND nmo:hasDenomination nm:denarius
http://nomisma.org/apis/avgWeight?constraints=nmo:hasTypeSeriesItem <http://numismatics.org/ocre/id/ric.1(2).aug.1A>

Average Diameter

Get average diameter for given SPARQL query.
Webservice Type : REST
Url : nomisma.org/avgDiameter?
Parameters : constraints (following predicate - object format. multiple contraints separated by ' AND '. See examples below), format ('json' or 'xml', default 'xml')
Result : returns a decimal number in a response wrapper.
Examples: http://nomisma.org/apis/avgDiameter?constraints=dcterms:source nm:ric AND nmo:hasMint nm:rome AND nmo:hasDenomination nm:denarius
http://nomisma.org/apis/avgDiameter?constraints=nmo:hasTypeSeriesItem <http://numismatics.org/ocre/id/ric.1(2).aug.1A>

Average Weight

Get average weight for given SPARQL query.
Webservice Type : REST
Url : nomisma.org/avgWeight?
Parameters : constraints (following predicate - object format. multiple contraints separated by ' AND '. See examples below), format ('json' or 'xml', default 'xml')
Result : returns a decimal number in a response wrapper.
Examples: http://nomisma.org/apis/avgWeight?constraints=dcterms:source nm:ric AND nmo:hasMint nm:rome AND nmo:hasDenomination nm:denarius
http://nomisma.org/apis/avgWeight?constraints=nmo:hasTypeSeriesItem <http://numismatics.org/ocre/id/ric.1(2).aug.1A>

Closing Date

Get the closing date of a hoard based on coin type URIs provided in the request parameter.
Webservice Type : REST
Url : nomisma.org/closingDate?
Parameters : identifiers (coin type URIs divided by a pipe '|'), format ('json' or 'xml', default 'xml')
Result : returns an integer which represents the year. Negative numbers refer to B.C. dates.
Examples: http://nomisma.org/apis/closingDate?identifiers=http://numismatics.org/crro/id/rrc-385.4|http://numismatics.org/crro/id/rrc-409.2|http://numismatics.org/ocre/id/ric.1(2).aug.1A

Get Label

Get the label of a Nomisma ID given its URI and language code.
Webservice Type : REST
Url : nomisma.org/getLabel?
Parameters : uri (of Nomisma ID), lang (two-letter ISO language code), format ('json' or 'xml', default 'xml')
Result : returns the label in given language, or English as default.
Examples: apis/getLabel?uri=http://nomisma.org/id/ar&lang=fr

Get RDF

Aggregate RDF for Nomisma ids. The default stream is in RDF/XML, but Turtle and JSON-LD are available.
Webservice Type : REST
Url : nomisma.org/getRdf?
Parameters : identifiers (Nomisma ids divided by a pipe '|'), format ('xml', 'ttl', 'json'; default 'xml')
Result : RDF/XML, RDF/TTL. Other RDF formats will be supported eventually.
Examples: apis/getRdf?identifiers=rome|augustus|av|aureus

Accessing Data

Individual Records

Numishare supports delivery of individual records in a variety of models and serializations through both REST and content negotiation. Content negotiation (with the accept header) requests should be sent to the URI space http://nomisma/id/. Requesting an unsupported content type will result in an HTTP 406: Not Acceptable error.

Model REST Content Type
HTML http://nomisma.org/id/{$id} text/html
KML http://nomisma.org/id/{$id}.kml application/vnd.google-earth.kml+xml
RDF/XML http://nomisma.org/id/{$id}.rdf application/rdf+xml
Turtle http://nomisma.org/id/{$id}.ttl text/turtle
JSON-LD http://nomisma.org/id/{$id}.jsonld application/ld+json

Search Results

Search results (the browse page) are returned in HTML5, but Numishare supports Atom and RSS via REST, as well as Atom and raw Solr XML via content negotiation of the browse page URL, http://nomisma.org/browse. The REST-based Atom feed sorts by the Lucene syntax 'timestamp desc' by default, but the sort parameter may be provided manually to alter the default field and order.

Model REST Content Type
HTML http://nomisma.org/browse text/html
Atom http://nomisma.org/feed/ application/atom+xml
Solr/XML N/A application/xml

Pelagios RDF Dump

Data dumps conforming to the Pelagios 3 model are linked on the index page. At present, these files are only available in RDF/XML.