-
Notifications
You must be signed in to change notification settings - Fork 3
Collections Online API
The Collections Online API follows the JSONAPI specification.
Search all collections.
Name | Type | Required | Description |
---|---|---|---|
q | string | Yes | Search term |
page[number] | integer | No | Zero indexed pagination page number to retrieve |
page[size] | integer | No | Pagination page size (default 50, max 100) |
fields[TYPE] | string | No | CSV fields to return for a resource TYPE |
(Plural parameters are optionally multiple)
To comply with the jsonapi spec these filters are also available as filter[PARAM_NAME]
.
Name | Type | Required | Description |
---|---|---|---|
date[from] | date | No | e.g. 1829, 1900-12 or 1984-04-19 |
date[to] | date | No | e.g. 1829, 1900-12 or 1984-04-19 |
places | string | No | Associated geographical places |
Name | Type | Required | Description |
---|---|---|---|
type | string | No | e.g. Model locomotive |
people | string | No | Associated people e.g. Robert Stephenson |
organisations | string | No | ALIAS for "people" e.g. Liverpool & Manchester Railway |
categories | string | No | e.g. Locomotives and Rolling Stock |
museum | enum | No | NRM, SMG, NMeM or MSI |
on_display | booelan | No | Whether object is currently on display |
location | string | No | Object's current museum location (only if on_display) |
Name | Type | Required | Description |
---|---|---|---|
birth[place] | string | No | Name of place person was born |
birth[date] | date | No | ALIAS for "date[from]" |
death[date] | date | No | ALIAS for "date[to]" |
Name | Type | Required | Description |
---|---|---|---|
type | string | No | e.g. Engineering |
people | string | No | Associated people e.g. Robert Stephenson |
organisations | string | No | ALIAS for "people" e.g. Liverpool & Manchester Railway |
archive | string | No | Name of archive |
formats | string | No | e.g. bound volume, large format document or photograph |
creator | string | No | Name of creator |
has_image | boolean | No | Whether document has an image |
image_licences | string | No | Licence types for imagery e.g. CC BY-NC-SA |
GET /search?q=Charles&page[number]=3&page[size]=1 HTTP/1.1
// HTTP/1.1 200 OK
// Content-Type: application/vnd.api+json
{
"data": [
{
"type": "people", // or objects or documents
"id": "smga-people-26803",
"attributes": {
// Resource attributes TBC
},
"relationships": {
// Resource relationships TBC
// Format: http://jsonapi.org/format/#document-compound-documents
},
"meta": {
"score": 0.076713204 // Relevance of result
},
"links": {
"self": "http://www.sciencemuseum.org.uk/people/smga-people-26803" // Link to this resource
}
}
],
"meta": {
"total_pages": 8
},
"links": {
"first": "http://www.sciencemuseum.org.uk/search?q=Charles&page[number]=0&page[size]=1",
"last": "http://www.sciencemuseum.org.uk/search?q=Charles&page[number]=8&page[size]=1",
"prev": "http://www.sciencemuseum.org.uk/search?q=Charles&page[number]=2&page[size]=1",
"next": "http://www.sciencemuseum.org.uk/search?q=Charles&page[number]=4&page[size]=1"
}
}
TODO: Define response attributes and relationships for each resource type
Search restricted to objects in the collections. See GET /search
for parameters.
Search restricted to people in the collections. See GET /search
for parameters.
Search restricted to documents in the collections. See GET /search
for parameters.
Get data for the given object ID. Optional (ignored) SEO friendly slug.
Get related resources for the given object.
Get data for the given person ID. Optional (ignored) SEO friendly slug.
Get related resources for the given person.
Get data for the given document ID. Optional (ignored) SEO friendly slug.
Get related resources for the given document.