Example 2: Rijksmuseum
Last updated on
9 January 2024
note: based on 2.x-dev module version
Create entity type
- go to admin/structure/external-entity-types/add
- name: 'Rijksmuseum'
- name (plural): 'Rijksmuseum objects'
Define storage client
- Storage client: choose 'REST'
- endpoint
https://www.rijksmuseum.nl/api/en/collection
- response format: choose 'json'
- pager settings: 'p', page number, 'ps'. number of items per page
- list parameters:
format|json key|fpGQTuED
- single parameters:
format|json key|fpGQTuED
Manage fields
Make sure to first save your Edit of the new external entity.
Before we can map fields we need to define new fields so visit Manage fields.
- Add text field 'creation date'
- Add text field 'object number'
- Add text field 'creator'
- Add link field 'image' (note use link field instead of file or image field as the images are external urls)
Fields mapping
Go back to Edit and visit the Field mappings.
Choose JSONPath as Field mapper and add the following mappings:
id: $.artObject.objectNumber
uuid: $.artObject.objectNumber
title: $.artObject.title
creator: $.artObject.principalMaker
object number: $.artObject.objectNumber
creation date: $.artObject.dating.presentingDate
image: $.artObject.webImage.url
The uuid and id are the same in this case, depending on the source the uuid could be something different than the object id.
Image display
- install Imagecache external
- disable whitelist or add rijksmuseum.nl to the whitelist on the Imagecache External configuration page
- choose 'Imagecache external image' as display format for the link field 'image'
Verify entities
1. Note that the list of external entities on /rijksmuseum doesn't work yet
2. Check an individual external entity, for example /rijksmuseum/SK-C-5
Help improve this page
Page status: No known problems
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion