Skip to content

AI extraction layer - API Contracts #550

Description

@chetanr25

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

Status
No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions