This document outlines the application programming interface (API) of NDE's proof of concept Registry. It describes the endpoints that can be used by consuming applications, such as the collection management systems of cultural heritage institutions.
This document is published for examination, experimental implementation and evaluation. It is not an official specification.
- The API uses modern API standards and best practices
- The API uses Linked Data Platform (LDP) for HTTP operations on web resources
- The API uses JSON-LD as the preferred format for transmitting data
- The API uses established Linked Data vocabularies (e.g. DCAT, Dublin Core, FOAF)
- The API doesn't support authentication or authorization (yet)
- The API doesn't support pagination (yet)
An organization profile contains the metadata of an organization describing its characteristics, both administrative, descriptive and structural.
GET /organizations
Headers
Key |
Value |
Accept |
application/ld+json |
Headers
Key |
Value |
Status |
200 OK |
ETag |
{etagValue} |
Content-Type |
application/ld+json |
Accept-Post |
application/ld+json |
Allow |
POST,GET |
Link |
<http://www.w3.org/ns/ldp#BasicContainer>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcterms": "http://purl.org/dc/terms/",
"ldp": "http://www.w3.org/ns/ldp#"
},
"@id": "/organizations",
"@type": ["ldp:Container", "ldp:BasicContainer"],
"dcterms:title": "Organizations",
"ldp:contains": [
{"@id": "/organizations/1"},
{"@id": "/organizations/2"},
{"@id": "/organizations/3"}
]
}
Status |
Error description |
400 Bad Request |
The request is invalid |
POST /organizations
Headers
Key |
Value |
Content-Type |
application/ld+json |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcterms": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
"@type": "foaf:Organization",
"foaf:name": "Koninklijke Bibliotheek",
"dcterms:identifier": {
"@id": "https://www.kb.nl/"
}
}
Headers
Key |
Value |
Status |
201 Created |
Location |
/organizations/{organizationId} |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
GET /organizations/{organizationId}
Headers
Key |
Value |
Accept |
application/ld+json |
Headers
Key |
Value |
Status |
200 OK |
ETag |
{etagValue} |
Content-Type |
application/ld+json |
Accept-Patch |
application/ld+json |
Allow |
GET,PATCH,DELETE |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcterms": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
"@id": "/organizations/4",
"@type": "foaf:Organization",
"foaf:name": "Koninklijke Bibliotheek",
"dcterms:identifier": {
"@id": "https://www.kb.nl/"
},
"dcterms:created": {
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2017-05-16T10:00:00"
},
"dcterms:modified": {
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2017-05-16T10:00:00"
}
}
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
PATCH /organizations/{organizationId}
Headers
Key |
Value |
If-Match |
{etagValue} |
Content-Type |
application/ld+json |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcterms": "http://purl.org/dc/terms/",
"foaf": "http://xmlns.com/foaf/0.1/"
},
"@type": "foaf:Organization",
"foaf:name": "Koninklijke Bibliotheek",
"dcterms:identifier": {
"@id": "https://www.kb.nl/"
}
}
Headers
Key |
Value |
Status |
204 No Content |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
428 Precondition Required |
The precondition header is missing (If-Match) |
412 Precondition Failed |
The precondition header is invalid (If-Match) |
DELETE /organizations/{organizationId}
Headers
Key |
Value |
If-Match |
{etagValue} |
Headers
Key |
Value |
Status |
204 No Content |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
428 Precondition Required |
The precondition header is missing (If-Match) |
412 Precondition Failed |
The precondition header is invalid (If-Match) |
A dataset profile contains the metadata of a dataset describing its characteristics, both administrative, descriptive and structural.
GET /organizations/{organizationId}/datasets
Headers
Key |
Value |
Accept |
application/ld+json |
Headers
Key |
Value |
Status |
200 OK |
ETag |
{etagValue} |
Content-Type |
application/ld+json |
Accept-Post |
application/ld+json |
Allow |
POST,GET |
Link |
<http://www.w3.org/ns/ldp#BasicContainer>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcterms": "http://purl.org/dc/terms/",
"ldp": "http://www.w3.org/ns/ldp#"
},
"@id": "/organizations/4/datasets",
"@type": ["ldp:Container", "ldp:BasicContainer"],
"dcterms:title": "Datasets of Koninklijke Bibliotheek",
"ldp:contains": [
{"@id": "/organizations/4/datasets/1"},
{"@id": "/organizations/4/datasets/2"},
{"@id": "/organizations/4/datasets/3"}
]
}
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
POST /organizations/{organizationId}/datasets
Headers
Key |
Value |
Content-Type |
application/ld+json |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcat": "http://www.w3.org/ns/dcat#",
"dcterms": "http://purl.org/dc/terms/"
},
"@type": "dcat:Dataset",
"dcterms:title": "Nationale Bibliografie",
"dcterms:identifier": {
"@id": "https://data.kb.nl/datasets/nationale-bibliografie"
},
"dcterms:publisher": {
"@id": "/organizations/4"
}
}
Headers
Key |
Value |
Status |
201 Created |
Location |
/organizations/{organizationId}/datasets/{datasetId} |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
GET /organizations/{organizationId}/datasets/{datasetId}
Headers
Key |
Value |
Accept |
application/ld+json |
Headers
Key |
Value |
Status |
200 OK |
ETag |
{etagValue} |
Content-Type |
application/ld+json |
Accept-Patch |
application/ld+json |
Allow |
GET,PATCH,DELETE |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcat": "http://www.w3.org/ns/dcat#",
"dcterms": "http://purl.org/dc/terms/"
},
"@id": "/organizations/4/datasets/4",
"@type": "dcat:Dataset",
"dcterms:title": "Nationale Bibliografie",
"dcterms:identifier": {
"@id": "https://data.kb.nl/datasets/nationale-bibliografie"
},
"dcterms:publisher": {
"@id": "/organizations/4"
},
"dcterms:created": {
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2017-05-16T10:00:00"
},
"dcterms:modified": {
"@type": "http://www.w3.org/2001/XMLSchema#dateTime",
"@value": "2017-05-16T10:00:00"
}
}
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
PATCH /organizations/{organizationId}/datasets/{datasetId}
Headers
Key |
Value |
If-Match |
{etagValue} |
Content-Type |
application/ld+json |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
{
"@context": {
"dcat": "http://www.w3.org/ns/dcat#",
"dcterms": "http://purl.org/dc/terms/"
},
"@type": "dcat:Dataset",
"dcterms:title": "Nationale Bibliografie",
"dcterms:identifier": {
"@id": "https://data.kb.nl/datasets/nationale-bibliografie"
},
"dcterms:publisher": {
"@id": "/organizations/4"
}
}
Headers
Key |
Value |
Status |
204 No Content |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
428 Precondition Required |
The precondition header is missing (If-Match) |
412 Precondition Failed |
The precondition header is invalid (If-Match) |
DELETE /organizations/{organizationId}/datasets/{datasetId}
Headers
Key |
Value |
If-Match |
{etagValue} |
Headers
Key |
Value |
Status |
204 No Content |
Link |
<http://www.w3.org/ns/ldp#RDFSource>; rel="type",<http://www.w3.org/ns/ldp#Resource>; rel="type" |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |
428 Precondition Required |
The precondition header is missing (If-Match) |
412 Precondition Failed |
The precondition header is invalid (If-Match) |
An object profile is a subset of the metadata of an object containing its URI and URI references to (a) the terms that characterize the object and (b) other, related objects (for instance, the parts of a multi-volume book).
Contrary to an organization and dataset profile, the Registry does not assign a URI to an object profile. An object profile is merely a container of backlinks, not a resource on its own. It therefore cannot be registered, updated or unregistered like an organization or dataset profile. Instead, an object profile is maintained via notifications.
We’re considering Webmention as the protocol for sending and receiving notifications. The basic flow is as follows:
- A curator at a heritage institution creates or updates an object description in his collection management system (CMS), including a term from a terminology source.
- The CMS sends a notification to the Webmention endpoint of the institution in the Registry, containing the URI of the object description ("source") and the URI of the term ("target").
- The Registry receives the notification.
- The Registry verifies that the target (the URI of the term) is valid.
- The Registry verifies that the source (the URI of the object description) is valid and contains a link to the target (by making a GET request to the source).
POST /organizations/{organizationId}/datasets/{datasetId}/objects
Headers
Key |
Value |
Content-Type |
application/x-www-form-urlencoded |
source=http://hdl.handle.net/10934/RM0001.COLLECT.446245&
target=http://iconclass.org/45K1.json
Headers
Key |
Value |
Status |
202 Accepted |
Content-Length |
0 |
Status |
Error description |
400 Bad Request |
The request is invalid |
404 Not Found |
The resource does not exist |