Services

The services consist of a series of REST URI calls with associated parameters. The returned data is a JSON structured string. The services all permit AJAX callbacks for use in browser based applications. Arguments may be present in any order. Argument names are not case sensitive, but any URI argument values are case sensitive. The source code for all SENESCHAL services is available as Open Source under a Creative Commons Attribution (CC-BY) license.

Service calls


getSchemes

Get a list of concept schemes currently in the data store

Arguments

limit (optional)
Maximum number of records to return. If omitted or set to the default value (zero), then all records will be returned
offset (optional)
(zero based) offset for records. If omitted or set to the default value (zero), then returned data will start from first record. This is useful for paging through larger result sets, rather than requesting all data within one service call
alias (optional)
shorten full URIs in the results by appying common namespace alias prefixes
verbose (optional)
Return verbose output. If included then all property values are returned
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Examples

Call: http://www.heritagedata.org/live/services/getSchemes?limit=3&alias&pretty

Response is a JSON encoded array of records – each record represents an individual ConceptScheme

[
  {
    "uri":"http://purl.org/heritagedata/schemes/3",
    "label":"Maritime Craft Thesaurus (Scotland)",
    "label lang":"en",
    "description":"Types of craft that survive as wrecks, or are documented as losses, in Scottish maritime waters.",
    "attribution":"RCAHMS"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_tmc",
    "label":"MARITIME CRAFT TYPE (EH)",
    "label lang":"en",
    "description":"A thesaurus of craft types which survive as wrecks in English Heritages maritime record",
    "attribution":"English Heritage"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_tbm",
    "label":"BUILDING MATERIALS (EH)",
    "label lang":"en",
    "description":"Thesaurus of main constructional material types (eg. the walls) for indexing of monuments.",
    "attribution":"English Heritage"
  }
]

Call: http://www.heritagedata.org/live/services/getSchemes?limit=3&alias&verbose&pretty
Response is a JSON encoded array of records – in the verbose output each record represents an individual PROPERTY of a ConceptScheme

[
   {
      "uri":"http://purl.org/heritagedata/schemes/1",
      "property":"rdf:type",
      "value":"skos:ConceptScheme"
   },
   {
      "uri":"http://purl.org/heritagedata/schemes/1",
      "property":"cc:license",
      "value":"http://reference.data.gov.uk/id/open-government-licence"
   },
   {
      "uri":"http://purl.org/heritagedata/schemes/1",
      "property":"cc:attributionURL",
      "value":"http://www.rcahms.gov.uk"
   }
]

getTopConceptsForScheme

Get a list of the ‘top’ (hierarchical root) concepts for the specified scheme URI

Arguments

schemeURI (required)
The scheme the concepts will originate from. If omitted , then an empty result set will be returned
limit (optional)
Maximum number of records to return. If omitted or set to the default value (zero), then all records will be returned
offset (optional)
(zero based) offset for records. If omitted or set to the default value (zero), then returned data will start from first record
alias (optional)
shorten full URIs in the results by appying common namespace alias prefixes
verbose (optional)
Return verbose output. If omitted then only uri, and prefLabel are returned, otherwise all property values are returned
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Examples

Call: http://www.heritagedata.org/live/services/getTopConceptsForScheme?schemeURI=http://purl.org/heritagedata/schemes/eh_period&limit=3&alias&pretty

Response is a JSON encoded array of records – in the default non-verbose output each record represents an individual Concept

[
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/PM",
    "label":"POST MEDIEVAL",
    "label lang":"en"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/MD",
    "label":"MEDIEVAL",
    "label lang":"en"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/UM",
    "label":"EARLY MED. OR LATER",
    "label lang":"en"
  }
]

Call: http://www.heritagedata.org/live/services/getTopConceptsForScheme?schemeURI=http://purl.org/heritagedata/schemes/eh_period&limit=3&alias&verbose&pretty
Response is a JSON encoded array of records – in the verbose output each record represents an individual PROPERTY of a Concept

[
   {
      "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/BA",
      "property":"rdf:type",
      "value":"skos:Concept"
   },
   {
      "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/BA",
      "property":"cc:license",
      "value":"http://creativecommons.org/licenses/by/3.0"
   },
   {
      "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/BA",
      "property":"cc:attributionURL",
      "value":"http://www.english-heritage.org.uk"
   }
]

getConceptsForScheme

Get a list of concepts in the specified scheme

Arguments

schemeURI (required)
The scheme the concepts will originate from. If omitted then an empty result set will be returned
limit (optional)
Maximum number of records to return. If omitted or set to the default value (zero), then all records will be returned
offset (optional)
(zero based) offset for records. If omitted or set to the default value (zero), then returned data will start from first record
alias (optional)
shorten full URIs in the results by appying common namespace alias prefixes
verbose (optional)
Return verbose output. If omitted then only uri and prefLabel are returned, otherwise all property values are returned
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Examples

Call: http://www.heritagedata.org/live/services/getConceptsForScheme?schemeURI=http://purl.org/heritagedata/schemes/eh_period&limit=3&alias&pretty
Response is a JSON encoded array of records – in the default non-verbose output each record represents an individual Concept

[
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/PM",
    "label":"POST MEDIEVAL",
    "label lang":"en"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/MD",
    "label":"MEDIEVAL",
    "label lang":"en"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/UM",
    "label":"EARLY MED. OR LATER",
    "label lang":"en"
  }
]

Call: http://www.heritagedata.org/live/services/getConceptsForScheme?schemeURI=http://purl.org/heritagedata/schemes/eh_period&limit=3&alias&verbose&pretty
Response is a JSON encoded array of records – in the verbose output each record represents an individual PROPERTY of a Concept

[
   {
      "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/BA",
      "property":"rdf:type",
      "value":"skos:Concept"
   },
   {
      "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/BA",
      "property":"cc:license",
      "value":"http://creativecommons.org/licenses/by/3.0"
   },
   {
      "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/BA",
      "property":"cc:attributionURL",
      "value":"http://www.english-heritage.org.uk"
   }
]

getConceptRelations

Get a list of broader, narrower or related concepts for the specified conceptURI

Arguments

conceptURI (required)
The concept to find relations for. If omitted then an empty result set will be returned
limit (optional)
Maximum number of records to return. If omitted or set to the default value (zero), then all records will be returned
offset (optional)
(zero based) offset for records. If omitted or set to the default value (zero), then returned data will start from first record
alias (optional)
shorten full URIs in the results by appying common namespace alias prefixes
verbose (optional)
Return verbose output. If omitted then only uri and label are returned, otherwise all property values are returned
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Examples

Call: http://www.heritagedata.org/live/services/getConceptRelations?conceptURI=http://purl.org/heritagedata/schemes/mda_obj/concepts/96665&limit=3&alias&pretty
Response is a JSON encoded array of records – in the default non-verbose output each record represents an individual Concept

[
  {
    "property":"skos:broader",
    "uri":"http://purl.org/heritagedata/schemes/mda_obj/concepts/96706",
    "label":"JEWELLERY",
    "label lang":"en"
  },
  {
    "property":"skos:narrower",
    "uri":"http://purl.org/heritagedata/schemes/mda_obj/concepts/97115",
    "label":"PLATE BROOCH",
    "label lang":"en"
  },
  {
    "property":"skos:narrower",
    "uri":"http://purl.org/heritagedata/schemes/mda_obj/concepts/96719",
    "label":"PENANNULAR BROOCH",
    "label lang":"en"
  }
]

Call: http://www.heritagedata.org/live/services/getConceptRelations?conceptURI=http://purl.org/heritagedata/schemes/mda_obj/concepts/96665&limit=3&alias&verbose&pretty
Response is a JSON encoded array of records – in the verbose output each record represents an individual PROPERTY of a Concept

[
  {
    "uri":"http://purl.org/heritagedata/schemes/mda_obj/concepts/96706",
    "property":"rdf:type",
    "value":"skos:Concept"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/mda_obj/concepts/96706",
    "property":"cc:license",
    "value":"http://creativecommons.org/licenses/by/3.0"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/mda_obj/concepts/96706",
    "property":"cc:attributionURL",
    "value":"http://www.english-heritage.org.uk"
  }
]

getConceptLabels

Get a list of preferred or alternate labels for the specified conceptURI

Arguments

conceptURI (required)
The concept to find relations for. If omitted then an empty result set will be returned
limit (optional)
Maximum number of records to return. If omitted or set to the default value (zero), then all records will be returned
offset (optional)
(zero based) offset for records. If omitted or set to the default value (zero), then returned data will start from first record
alias (optional)
shorten full URIs in the results by appying common namespace alias prefixes
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Examples

Call: http://www.heritagedata.org/live/services/getConceptLabels?conceptURI=http://purl.org/heritagedata/schemes/mda_obj/concepts/96665&limit=3&alias&pretty
Response is a JSON encoded array of records – each record represents an individual Label

[
  {
    "property":"skos:prefLabel",
    "label":"BROOCH",
    "label lang":"en"
  },
  {
    "property":"skos:altLabel",
    "label":"Fibula",
    "label lang":"en"
  },
  {
    "property":"skos:altLabel",
    "label":"Brooch Spring",
    "label lang":"en"
  }
]

getConceptLabelMatch

Match against concept labels (preferred and alternate labels)

Arguments

schemeURI (required)
URI of concept scheme the labels will originate from. The URI is case sensitive
startsWith (optional)
Search for labels that start with this text. The value is not case sensitive. May be used in combination with ‘contains’
contains (optional)
Search for labels containing this text. The value is not case sensitive. May be used in combination with ‘startsWith’
limit (optional)
Maximum number of records to return. If omitted or set to the default value (zero), then all matching records will be returned
offset (optional)
(zero based) offset for records. If omitted or set to the default value (zero), then returned data will start from first record
alias (optional)
shorten full URIs in the results by appying common namespace alias prefixes
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Example

Call: http://www.heritagedata.org/live/services/getConceptLabelMatch?schemeURI=http://purl.org/heritagedata/schemes/eh_period&startsWith=EARLY&limit=3&pretty
Response is a JSON encoded array of records – each record represents an individual Concept

[
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/UM",
    "label":"EARLY MED. OR LATER",
    "label lang":"en"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/EM",
    "label":"EARLY MEDIEVAL",
    "label lang":"en"
  },
  {
    "uri":"http://purl.org/heritagedata/schemes/eh_period/concepts/EIA",
    "label":"EARLY IRON AGE",
    "label lang":"en"
  }
]

getConceptExists

Check whether a specific label exists in a specific concept scheme

Arguments

schemeURI (required)
The URI of the scheme to check for the presence of the concept. The URI is case sensitive
label (required)
The label to search for. Preferred and alternate labels are checked. The value to search for is not case sensitive

Example

Call: http://www.heritagedata.org/live/services/getConceptExists?schemeURI=http://purl.org/heritagedata/schemes/eh_tmt2&label=BYRE

The response is a simple true or false

true

getResource

Get all RDF properties for a specific resource (may be a scheme or a concept)

Arguments

uri (required)
The URI of the resource. The URI is case sensitive
pretty (optional)
The returned JSON is formatted with whitespace and line breaks for readability (pretty printed)

Example

Call: http://www.heritagedata.org/live/services/getResource?uri=http://purl.org/heritagedata/schemes/eh_tmt2&pretty

The response is a JSON encoded object


			
%d bloggers like this: