> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deeptrace.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Investigation

> Retrieve the status and results of a Deeptrace investigation

Retrieve the current status and results of an investigation. Poll this endpoint until `status` is `completed`. Investigations typically complete in a few minutes.

## Headers

<ParamField header="X-API-Key" type="string" required>
  Your Deeptrace API key. Obtain from **[Settings](https://app.deeptrace.com/settings) > [API Keys](https://app.deeptrace.com/api-keys)**. Also accepts `Authorization: Bearer <key>`.
</ParamField>

## Parameters

<ParamField path="investigation_id" type="string" required>
  UUID of the investigation, returned by [Trigger Investigation](https://docs.deeptrace.com/trigger-investigation).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl https://api.deeptrace.com/api/v1/investigations/d2ce1b29-f36a-43f0-9a96-c73a167b59f8 \
    -H "X-API-Key: dt_your_key_here"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.deeptrace.com/api/v1/investigations/d2ce1b29-f36a-43f0-9a96-c73a167b59f8",
      headers={"X-API-Key": "dt_your_key_here"}
  )

  data = response.json()
  print(data["status"], data["investigation_text"])
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.deeptrace.com/api/v1/investigations/d2ce1b29-f36a-43f0-9a96-c73a167b59f8",
    {
      headers: { "X-API-Key": "dt_your_key_here" },
    }
  );

  const data = await response.json();
  console.log(data.status, data.investigation_text);
  ```
</RequestExample>

## Returns

Returns an investigation object. While the investigation is running, `status` is `processing` and result fields are `null`. Once finished, `status` is `completed` and the full analysis is available.

<ResponseExample>
  ```json 200 — Processing theme={null}
  {
    "id": "d2ce1b29-f36a-43f0-9a96-c73a167b59f8",
    "status": "processing",
    "alert_summary": null,
    "investigation_text": null
  }
  ```

  ```json 200 — Completed theme={null}
  {
    "id": "d2ce1b29-f36a-43f0-9a96-c73a167b59f8",
    "status": "completed",
    "alert_summary": "Spike in 500s caused by connection pool exhaustion",
    "investigation_text": "**Quick Summary:** The 500 errors on /checkout are caused by..."
  }
  ```
</ResponseExample>

<ResponseField name="id" type="string">
  UUID of the investigation.
</ResponseField>

<ResponseField name="status" type="string">
  `processing` while the investigation is running, `completed` when finished.
</ResponseField>

<ResponseField name="alert_summary" type="string | null">
  Short title summarizing the investigation findings. `null` while processing.
</ResponseField>

<ResponseField name="investigation_text" type="string | null">
  Full investigation results in markdown format. `null` while processing.
</ResponseField>

<Tip>
  Completed investigations are also viewable at `https://app.deeptrace.com/investigation/{id}` with full citations and tool call details.
</Tip>
