Import endpoint should allow for Open Library work identifiers
Problem
TL;DR
Same as https://github.com/internetarchive/openlibrary/issues/9411 but for Works :)
A clear and concise description of what you want to happen
Be able to provide Open Library OL…W Work identifiers when importing books if the importer has already otherwise dealt with the matching (e.g., using other identifiers).
Expected behaviour / screenshots (ex: Figma design screenshots for UI feature)
Being able to include the OL Work identifier in the JSON or other import payload.
Additional Context
It might be possible for bots or other scripts to do matching beforehand, or even for import sources to already have OL identifiers (e.g., BookBrainz, MusicBrainz, and Wikidata all do). Being able to provide this to OL when adding an import means that the OL importing pipeline would have to do a lot less work since it’s just been handed the ID.
Proposal & Constraints
What is the proposed solution / implementation?
Add a field in the schema to provide an OL…W identifier for a given book.
Is there a precedent of this approach succeeding elsewhere?
Which suggestions or requirements should be considered for how feature needs to appear or be implemented?
Unlike the case with https://github.com/internetarchive/openlibrary/issues/9411 a book (in the OL schema/data model) can only even have one Work and either the Work is known (ie., there’s an OL…W identifier) or it isn’t. However, it could still take the approach of using the OL…W in the first hand, but also be ready to toss it if it turns out that it’s a bad identifier and fall back to matching based on other values (ie., the current approach).
Leads
Related files
Schema: https://github.com/internetarchive/openlibrary-client/blob/master/olclient/schemata/import.schema.json (though this may be moved to this repository; see https://github.com/internetarchive/openlibrary/issues/9351 for status of this) Import logic: https://github.com/internetarchive/openlibrary/tree/master/openlibrary/plugins/importapi
Stakeholders
Instructions for Contributors
- Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.