Incidents CRUD
Part of: #541
Depends on: AI extraction (#550), Single form generation (#552)
NOTE: We need to finalise the incident contract record JSON first and then follow same structure throughout. We definitely need a round of discussion before anyone work on this issue.
Contract reference
Endpoints
POST /api/v1/incidents - Creates a permanent incident record that links input, extraction, and generated forms into a single unit. See path/incidents.yaml#L8-L68
GET /api/v1/incidents - Paginated list with filtering and sorting. Uses PaginationMeta from sub-issue 2. See path/incidents.yaml#L70-L163
GET /api/v1/incidents/{incident_id} - Full incident record including linked extraction, forms, and audit trail
PATCH /api/v1/incidents/{incident_id} - Update incident metadata (status, tags, notes). Does NOT change underlying extraction data
DELETE /api/v1/incidents/{incident_id} - Soft delete only, never removes data. See path/incidents.yaml#L252-L314
Incidents CRUD
Part of: #541
Depends on: AI extraction (#550), Single form generation (#552)
NOTE: We need to finalise the incident contract record JSON first and then follow same structure throughout. We definitely need a round of discussion before anyone work on this issue.
Contract reference
path/incidents.yamlschemas/incident-record.yamlEndpoints
POST /api/v1/incidents- Creates a permanent incident record that links input, extraction, and generated forms into a single unit. Seepath/incidents.yaml#L8-L68GET /api/v1/incidents- Paginated list with filtering and sorting. UsesPaginationMetafrom sub-issue 2. Seepath/incidents.yaml#L70-L163GET /api/v1/incidents/{incident_id}- Full incident record including linked extraction, forms, and audit trailPATCH /api/v1/incidents/{incident_id}- Update incident metadata (status, tags, notes). Does NOT change underlying extraction dataDELETE /api/v1/incidents/{incident_id}- Soft delete only, never removes data. Seepath/incidents.yaml#L252-L314