performant-software / core-data-cloud

Core Data. In the Cloud.
0 stars 1 forks source link

Identifiers: can we show more of the remote identifier record at select time? #173

Closed jamiefolsom closed 2 months ago

dleadbetter commented 6 months ago

After looking into the AtoM API, there doesn't appear to be a way to display the Fond/Series information without additional API calls. Here's an example payload from the /api/informationobjects endpoint:

        {
            "reference_code": "CA MICAON F2021-0001-S1-F2/Box1",
            "slug": "interfaith-activities",
            "title": "Interfaith Activities",
            "physical_characteristics": "Good",
            "repository": "Muslims in Canada Archives - Ontario",
            "level_of_description": "File",
            "creation_dates": [
                "2012-2016"
            ],
            "place_access_points": [
                "Toronto"
            ]
        }

Instead of displaying this information when the results are retrieved from AtoM, Core Data will make requests to the AtoM API to gather this information when a web_identifier record is created. We've also updated the /public/instances, /public/items, /public/places, and /public/works API endpoints to include the web_identifiers attribute:

    "web_identifiers": [
        {
            "id": 20,
            "identifier": "interfaith-activities",
            "extra": {
                "title": "Interfaith Activities",
                "parents": [
                    "Katherine Bullock fonds",
                    "Personal Work"
                ],
                "place_access_points": "Toronto"
            },
            "web_authority_id": 9,
            "web_authority": {
                "id": 9,
                "source_type": "atom"
            }
        }
    ]

This way, the user doing the data entry won't be able to see the Fonds/Series name, but we can use the extra attribute to display the information on the front-end.

dleadbetter commented 6 months ago

@SteveMarvin - For testing, there isn't much that's changed in the Core Data UI in terms of functionality, everything is handled behind the scenes, but it would probably be worth testing out the different types of web authorities to make sure we haven't broken anything.

SteveMarvin commented 6 months ago

So I have what appear to be working URLs for AtoM and Wikidata web authorities, but some authorities do not seem to require anything other than selecting the authority. Assuming that's correct, all I need is an API key for DPLA, the others require nothing.

Pending comment from Derek, I'm going to assume these are good.