Zum Inhalt

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 a metadata-article.json file.
  • It loads toolbox credentials from Prefect Secret blocks (toolbox-username, toolbox-password), ie, same mechanism as metadata_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_up for the metadata file path, unlike metadata_toolbox_upload, that means that the file must be in the non backed-up NAS.