boston-library / ark-manager

Archival Resource Key (ARK) Manager for BPL Digital Repository applications.
3 stars 0 forks source link

add /text endpoint to return associated text for a resource #96

Closed ebenenglish closed 1 month ago

ebenenglish commented 2 months ago

To support efficient fetching of OCR/transcribed text for a DigitalObject or Filestreams::* object, we should add a /text endpoint that returns a plain text response.

If there is no associated text the service should return 404.

We can set this up as new TextController class, using PreviewController as a model.

When looking at the item's Solr record, these fields indicate the presence of associated text: object type field
DigitalObject has_transcription_bsi
Filestreams::* has_ocr_text_bsi

NOTE: This issue is not blocked, but the functionality will depend on https://github.com/boston-library/curator/issues/360