Skip to content

Manage files and extractors

Upload and capture the returned metadata:

Terminal window
parsehawk files upload document.pdf
parsehawk files list
parsehawk files get file_...

Delete a stored file when no longer needed:

Terminal window
parsehawk files delete file_...

An existing job retains its record, but deleting source content can prevent new work or later content retrieval. Apply a retention policy to both files and job results.

Use a stable, lowercase name with ASCII letters, digits, hyphens, or underscores. It cannot begin with the reserved extractor_ prefix.

For source-controlled definitions, keep instructions, schema, and examples in files and synchronize idempotently:

Terminal window
parsehawk extractors put invoice_v1 \
--display-name "Invoice extractor" \
--instructions instructions.txt \
--schema invoice.schema.json \
--examples examples.json

Use a partial update for an intentional one-field change:

Terminal window
parsehawk extractors update invoice_v1 --display-name "Invoices"

Inspect and remove definitions:

Terminal window
parsehawk extractors list
parsehawk extractors get invoice_v1
parsehawk extractors delete invoice_v1

Treat the files passed to extractors put as the reviewable source of truth. When the output shape changes incompatibly, create a new stable extractor name instead of silently replacing the contract used by existing consumers.

Few-shot file examples reference uploaded file_... IDs and are therefore tied to the target ParseHawk data store. Inline-text examples are easier to move between installations.

See operate asynchronous jobs for execution and retention behavior after resources exist.