Skip to main content
GET
/
v1
/
investigation
/
{incidentId}
Get investigation results
curl --request GET \
  --url https://api.example.com/v1/investigation/{incidentId}

Overview

Returns the aggregated results from a completed investigation, including the root cause determination, confidence score, per-agent evidence, and recommended remediation actions. Required role: Any authenticated user (viewer or above)

Path parameters

incidentId
string
required
The unique identifier of the incident whose investigation results you want to retrieve. Example: inc_01HX9VTPQR3KF8MZWBYD5N6JCE.

Response

Returns 200 OK with the investigation results.
{
  "incidentId": "inc_01HX9VTPQR3KF8MZWBYD5N6JCE",
  "rootCause": "Unindexed query on the orders table introduced in deploy d9f3a21. The query performs a full table scan for every checkout request, causing latency to spike from 45ms to over 4800ms under normal load.",
  "confidence": 0.94,
  "evidence": [
    {
      "agentRole": "database-specialist",
      "content": "Analyzed slow query log. Query `SELECT * FROM orders WHERE tenant_id = ?` lacks a covering index on (tenant_id, created_at). Query plan shows Seq Scan on orders (rows=1847293). Index creation will reduce this to an Index Scan with estimated cost reduction of 99.7%."
    },
    {
      "agentRole": "deployment-tracker",
      "content": "Deploy d9f3a21 (2024-04-01 14:25 UTC) modified the OrderRepository query builder, removing the `.withIndex('tenant_created_idx')` hint. This corresponds exactly to the latency spike onset at 14:27 UTC."
    },
    {
      "agentRole": "performance-analyzer",
      "content": "P99 latency increased from 45ms to 4823ms at 14:27 UTC. CPU utilization on prod-db-01 reached 94% at peak. Pattern is consistent with a missing index causing sequential scans under load."
    }
  ],
  "recommendedActions": [
    "Add composite index: `CREATE INDEX CONCURRENTLY idx_orders_tenant_created ON orders (tenant_id, created_at DESC);`",
    "Roll back deploy d9f3a21 if the index migration cannot be applied within the current SLA window.",
    "Add query performance monitoring alert for queries exceeding 500ms on the orders table."
  ]
}
FieldTypeDescription
incidentIdstringThe incident this investigation belongs to
rootCausestringSynthesized root cause narrative from all agent findings
confidencenumberOverall confidence score from 0.0 to 1.0
evidencearrayPer-agent findings. Each entry includes agentRole and content.
evidence[].agentRolestringThe specialist agent that produced this evidence
evidence[].contentstringThe agent’s detailed findings for this incident
recommendedActionsstring[]Ordered list of recommended remediation steps
Returns 404 Not Found if the incident does not exist or investigation has not started.
If rootCause is null, the investigation is still in progress. Poll this endpoint until rootCause is populated, or listen for the investigation.completed webhook event.

Examples

curl https://api.causeflow.ai/v1/investigation/inc_01HX9VTPQR3KF8MZWBYD5N6JCE \
  -H "Authorization: Bearer <token>"