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

# Case Audit Log

> Retrieve the per-node execution audit of a case

Get a detailed, per-node view of a case's execution: which nodes ran, in what order, with which inputs and outputs, and which ones failed. Useful for progress display and debugging.

## Path Parameters

<ParamField path="caseId" type="string" required>
  The case ID returned by [Initiate Case](/api-reference/v1-case/initiate-case)
</ParamField>

## Headers

<ParamField header="x-service-key" type="string" required>
  Your API authentication key
</ParamField>

## Response

<ResponseField name="totalNodeCount" type="number" required>
  Total number of nodes in the workflow
</ResponseField>

<ResponseField name="runningNode" type="string">
  The node currently running. Empty string when no node is actively running (for example, between nodes or after the case finishes).
</ResponseField>

<ResponseField name="nextNode" type="string">
  The next node to execute. Empty string when the case has no more nodes queued.
</ResponseField>

<ResponseField name="remainingNodesToExecute" type="string[]" required>
  Nodes not executed yet
</ResponseField>

<ResponseField name="executedNodes" type="string[]" required>
  Nodes already executed
</ResponseField>

<ResponseField name="executedNodeCount" type="number" required>
  Number of nodes already executed
</ResponseField>

<ResponseField name="failedNodes" type="string[]" required>
  Nodes that failed
</ResponseField>

<ResponseField name="failedNodeCount" type="number" required>
  Number of nodes that failed
</ResponseField>

<ResponseField name="audit" type="object" required>
  Detailed per-node execution data

  <Expandable title="audit.nodesExecutionData">
    <ResponseField name="nodesExecutionData" type="object">
      Per-node execution data keyed by node name or ID. Each entry has the following properties:
    </ResponseField>

    <ResponseField name="executionStatus" type="string">
      Execution status of the node. Known values: `COMPLETED`, `FAILED`, `STARTED`, `WAITING`, `UNKNOWN` — treat as an open set; new statuses may appear.
    </ResponseField>

    <ResponseField name="executionStartTime" type="number">
      Node execution start time (epoch milliseconds)
    </ResponseField>

    <ResponseField name="executionTime" type="number">
      Node execution duration in milliseconds
    </ResponseField>

    <ResponseField name="executionIndex" type="number">
      Position of the node in the execution order
    </ResponseField>

    <ResponseField name="executionInput" type="array">
      Input variables of the node — `{ variableName, displayName, value, type }` entries. `null` when the node has no inputs.
    </ResponseField>

    <ResponseField name="executionOutput" type="array">
      Output variables of the node — `{ variableName, displayName, value, type }` entries. `null` when the node has no outputs.
    </ResponseField>
  </Expandable>
</ResponseField>

## Errors

<ResponseField name="401" type="Unauthorized">
  Missing, invalid, or expired API key.
</ResponseField>

<ResponseField name="404" type="Not Found">
  The case does not exist.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://operator.opus.com/api/v1/case/{YOUR_CASE_ID}/audit \
    --header 'x-service-key: {YOUR_SERVICE_KEY}'
  ```

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

  url = "https://operator.opus.com/api/v1/case/{YOUR_CASE_ID}/audit"
  headers = {"x-service-key": "{YOUR_SERVICE_KEY}"}

  response = requests.get(url, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://operator.opus.com/api/v1/case/{YOUR_CASE_ID}/audit",
    {
      method: "GET",
      headers: {
        "x-service-key": "{YOUR_SERVICE_KEY}",
      },
    }
  );

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

<ResponseExample>
  ```json 200 Response theme={null}
  {
    "totalNodeCount": 3,
    "runningNode": "",
    "nextNode": "",
    "remainingNodesToExecute": [],
    "executedNodes": ["Workflow Input", "Summarize", "Workflow Output"],
    "executedNodeCount": 3,
    "failedNodes": [],
    "failedNodeCount": 0,
    "audit": {
      "nodesExecutionData": {
        "Summarize": {
          "executionStatus": "COMPLETED",
          "executionStartTime": 1764755400000,
          "executionTime": 5230,
          "executionIndex": 1,
          "executionInput": [
            {
              "variableName": "{VARIABLE_NAME_1}",
              "displayName": "Source Text",
              "value": "…",
              "type": "str"
            }
          ],
          "executionOutput": [
            {
              "variableName": "{OUTPUT_VARIABLE_1}",
              "displayName": "Summary",
              "value": "…",
              "type": "str"
            }
          ]
        }
      }
    }
  }
  ```
</ResponseExample>
