Retrieve all sub providers within Smithsonian. This essentially means that every Smithsonian image would be categorised under a unique sub provider and there could be no images which do not belong to a sub provider.
Solution Description
The 'unit_code' field in the JSON response returned from a Smithsonian API call identifies the sub providers and we store this value in the image store meta data field. Since we want to categorise all Smithsonian images under unique sub providers, we need to have prior knowledge of all 'unit_code' values which can be assumed by images.
The following endpoint can be called to get all the 'unit_code' values associated with Smithsonian images: https://api.si.edu/openaccess/api/v1.0/terms/unit_code?q=online_media_type:Images&api_key=REDACTED.
We set the source value in the DB image table/image store to the relevant sub provider value when a known 'unit_code' is encountered. Otherwise an error is raised.
Additional context
Since the unit_code values might be updated at the Smithsonian API level, we need to have a mechanism of frequently checking whether the unit_code value list we are currently aware of has changed in some way. A seperate ticket #451 has been created to monitor this issue.
Problem Description
Retrieve all sub providers within Smithsonian. This essentially means that every Smithsonian image would be categorised under a unique sub provider and there could be no images which do not belong to a sub provider.
Solution Description
The 'unit_code' field in the JSON response returned from a Smithsonian API call identifies the sub providers and we store this value in the image store meta data field. Since we want to categorise all Smithsonian images under unique sub providers, we need to have prior knowledge of all 'unit_code' values which can be assumed by images. The following endpoint can be called to get all the 'unit_code' values associated with Smithsonian images: https://api.si.edu/openaccess/api/v1.0/terms/unit_code?q=online_media_type:Images&api_key=REDACTED. We set the source value in the DB image table/image store to the relevant sub provider value when a known 'unit_code' is encountered. Otherwise an error is raised.
Additional context
Since the unit_code values might be updated at the Smithsonian API level, we need to have a mechanism of frequently checking whether the unit_code value list we are currently aware of has changed in some way. A seperate ticket #451 has been created to monitor this issue.
This is related to issue #392