List and Retrieve Incidents
List incidents, find them by test case, status, or assignee, and read one incident with its status history through the OpenMetadata REST API and Python SDK.
GET
GET /v1/tasks
List and Retrieve Incidents
List incidents, read one incident, and search the incident status history.List Incidents as Tasks
List incidents withGET /v1/tasks. Set category=Incident to return only incidents.
GET /v1/tasks
Retrieve One Incident
Retrieve one incident by ID or by task number.- By ID:
GET /v1/tasks/{id} - By task number:
GET /v1/tasks/name/{taskId}, for exampleTASK-00001
fields and include.
Response
The task response includes these fields:Transitions that apply now. Each item has
id, label, targetStageId, targetTaskStatus, and requiresComment.Present after the incident is resolved. Includes
type, resolvedBy, resolvedAt, comment, and payload (which contains testCaseFailureReason).Search Incident History
Use the test case incident status endpoints to search incidents by test case or time and to read the full status history.
Each status record includes these fields:
id,stateId, andtimestamptestCaseResolutionStatusTypetestCaseResolutionStatusDetails: the assignee, or the failure reason and commentupdatedByandupdatedAttestCaseReferenceandseveritymetrics:timeToResponseandtimeToResolution, in milliseconds
Keep an External Tracker in Sync
OpenMetadata doesn’t include a built-in Jira integration. Task responses have anexternalReference field for storing a Jira key, but OpenMetadata doesn’t sync it for you.
To mirror incidents in a tracker such as Jira:
- Create a
Notificationalert on thetasksource with a webhook destination. See Alert for Incident Events. - In your receiver, deduplicate on the event
id. ReadentityTypeand the parsedentity. - Ignore events that aren’t incidents (
entity.categoryisn’tIncident). - Use the incident ID (
entityId) as the key that links the Jira issue and the incident, and store it on the issue. - On each event, read
entity.workflowStageIdand update the issue. - To close the loop, call Change Incident Status when the issue changes in the tracker.
- Run a periodic
GET /v1/tasks?category=Incident&statusGroup=openas a safety net, because OpenMetadata doesn’t automatically resend a webhook that failed.