AI extraction (start + poll)
Part of #541
Depends on: Async job infrastructure (#545), Text input (#546)
Contract reference
Endpoints
POST /api/v1/extract/{input_id}
Takes the narrative from a previously submitted input and sends it to the local Ollama LLM to extract incident fields into the structured incident contract JSON schema.
This is async (LLM can take 30-120 seconds). Returns 202 with extract_id and job_id for polling. Details on request/error handling in the contract reference above.
GET /api/v1/extract/{extract_id}
Returns the extraction result. When completed, the response contains the full incident contract JSON under incident_contract. When still processing, returns status with retry_after_seconds.
See schemas/incident-contract.yaml for the JSON structure.
AI extraction (start + poll)
Part of #541
Depends on: Async job infrastructure (#545), Text input (#546)
Contract reference
path/extraction.yaml#L7-L156schemas/extraction-record.yamlschemas/incident-contract.yamlEndpoints
POST /api/v1/extract/{input_id}Takes the narrative from a previously submitted input and sends it to the local Ollama LLM to extract incident fields into the structured incident contract JSON schema.
This is async (LLM can take 30-120 seconds). Returns
202withextract_idandjob_idfor polling. Details on request/error handling in the contract reference above.GET /api/v1/extract/{extract_id}Returns the extraction result. When completed, the response contains the full incident contract JSON under
incident_contract. When still processing, returns status withretry_after_seconds.See
schemas/incident-contract.yamlfor the JSON structure.