Interoperable data formats and profiles
General principles
The Gallery offers data in three formats:
- HTML
- JSON
- XML
Requests for HTML redirect to either a rich page for the entity on the Gallery's website, if one is available, or a stub page. For JSON and XML, we offer a default data profile for each published entity type; wherever possible, we have chosen a well-documented and ideally well-established standard.
Default data profiles
Default data profiles, by file format:
- JSON: all entity types are delivered as Linked Art, in its default serialisation of JSON-LD
- XML:
- Agents: CIIM profile
- Archives: Qualified Dublin Core
- Concepts: SKOS
- DokuWiki texts: CIIM profile
- Events: SKOS
- Exhibitions: Qualified Dublin Core
- Locations: SKOS
- Media: Qualified Dublin Core
- Objects: LIDO
- Packages: Qualified Dublin Core
- Places: SKOS
- Publications: Qualified Dublin Core
Additional data profiles
In addition, we offer the following profiles if data is available:
- JSON:
- Agents: CIIM profile, IIIF manifest for related media
- Archives: CIIM profile, IIIF manifest for related media
- Concepts: CIIM profile, JSKOS, IIIF manifest for related media
- DokuWiki texts: CIIM profile, IIIF manifest for related media
- Events: CIIM profile, JSKOS, IIIF manifest for related media
- Exhibitions: CIIM profile, IIIF manifest for related media
- Locations: CIIM profile, JSKOS, IIIF manifest for related media
- Media: CIIM profile, IIIF info.json metadata file
- Objects: CIIM profile, IIIF manifest for related media
- Packages: CIIM profile, IIIF manifest for related media
- Places: CIIM profile, JSKOS, IIIF manifest for related media
- Publications: CIIM profile, IIIF manifest for related media
- XML:
- Agents: CIIM profile
- Archives: CIIM profile
- Concepts: CIIM profile
- DokuWiki texts: CIIM profile
- Events: CIIM profile
- Exhibitions: CIIM profile
- Locations: CIIM profile
- Media: CIIM profile
- Objects: CIIM profile, Qualified Dublin Core
- Packages: CIIM profile
- Places: CIIM profile
- Publications: CIIM profile
Retrieving data
Interoperable data is currently provided as a file per item, and can be retrieved using the item's PID. For the moment, PIDs need to be retrieved using our Elasticsearch API. Requests for interoperable data take the form:
{base URL}/{PID}{profile parameter}|{filetype extension}
- Base URL: https://data.ng.ac.uk
- Profile parameter: “?profile=”, followed by one of the following values:
- ciim-json
- ciim-xml
- dc
- iiif
- jskos
- lido
- linked-art
- skos
- Filetype extension: “.”, followed by one of the following values:
- htm
- html
- json
- xml
So https://data.ng.ac.uk/0F6J-0001-0000-0000?profile=lido returns the LIDO XML record for NG35, Titian, Bacchus and Ariadne.
Requests are processed in the order:
- profile parameter (filetype extension and request header are ignored)
- filetype extension (request header is ignored)
- HTTP request header ACCEPT value (one of text/html, application/json, application/xml)
In the absence of all the above, JSON is returned with data organised according to the CIIM profile. Invalid requests - i.e. for a profile which is not available for a particular entity type - will return an HTTP 400 error.
Known issues
The current endpoints are being released as a beta so that we can try and make sure they eventually meet users' requirements. If you spot any errors, incorrect mappings, or other issues, please let us know via hello@nationalgallery.org.uk. Known issues are:
- The delivery of CIIM-formatted XML is currently known to be flaky (we have encountered errors when returning data for places).
- HTML stub pages are still to be put in place for archive, DokuWiki, exhibition and some media records.
- IIIF image URLs, info.json data and manifests will not resolve, pending the introduction of our IIIF framework for collection images.
Re-use licences
The Gallery's data is made available for reuse under specific licences; for more information see Licences.