Skip to content

Investigate and Document Bulkrax JSON API Support for CSV Importers #1054

@ShanaLMoore

Description

@ShanaLMoore

Summary

The Bulkrax wiki references a JSON API, and a community member inquired whether it's possible to use the API to create a CSV importer and provide the CSV data via HTTP. Initial investigation suggests this might be possible, but current attempts to authenticate and use the API in a Hyku environment return a 401 Unauthorized error. We need to verify whether this functionality still works, how it’s intended to be used, and update the documentation accordingly.

Acceptance Criteria

  • Confirm whether the Bulkrax JSON API supports creating a CSV importer and uploading data via HTTP
  • Verify authentication requirements (token format, permissions, etc.) and why BULKRAX_API_TOKEN fails
  • Determine if Valkyrie or recent Bulkrax updates affect this API endpoint
  • Update or create documentation with correct usage, including request examples
  • Identify any broken or outdated wiki content and fix or remove it
  • If the feature is broken, create a follow-up issue with a clear description of what needs to be fixed

Screenshots or Video

Slack Conversation

Slack thread screenshot

curl -X GET https://dev-hyku.localhost.direct/importers.json \
  -H "Content-Type: application/json" \
  -H "Authorization: Token: BULKRAX_API_TOKEN"

Response:

{"code":401,"message":"Authentication Required","description":"You must be logged in to do that!"}

Testing Instructions

  1. Generate a token using SecureRandom.hex(32) and set it as BULKRAX_API_TOKEN in .env
  2. Attempt to make a GET request to /importers.json using the token
  3. Try creating a new CSV importer using the POST endpoint (if possible)
  4. Review any relevant controller-level authentication logic in Bulkrax
  5. Check whether token-based authentication is gated behind a user session or current_user

Sample Files

N/A — testing will use API requests, not uploaded files

Notes

  • The original author of the wiki entry is no longer available
  • No current team members have confirmed successful use of this API
  • This may need to be validated against both AF-based and Valkyrie-based Hyku/Bulkrax setups

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions