toolbox_crossref_upload
toolbox_crossref_upload uploads a single, manually-specified article's CrossRef metadata to the toolbox system, given an explicit project ID, text ID, and file path. It's a manual, single-article debugging/testing tool (not part of the automated pipeline). It is useful for re-sending one article's metadata without running the full metadata_toolbox_upload module across an entire journal.
This is a minimal, standalone example of calling the toolbox upload endpoint directly.
Working
- It takes three parameters, all with hardcoded example defaults:
project_id,text_id, and a relative path to ametadata-article.jsonfile. - It loads toolbox credentials from Prefect Secret blocks (
toolbox-username,toolbox-password), ie, same mechanism asmetadata_toolbox_upload. - Then it reads the specified metadata JSON file, and POSTs it to
<toolbox_base_url>/<project_id>with the same headers/content-type pattern used elsewhere (Content-Type: application/x.crossref+json,X-File-ID: <text_id>). - Finally, it logs the request URL, headers, file path, and response.
Important information
- Meant for manual/one-off use, not scheduling.
- Uses
data_root_not_backed_upfor the metadata file path, unlikemetadata_toolbox_upload, that means that the file must be in the non backed-up NAS.