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

# Get Workflow Execution Tree

> Retrieves the complete execution tree showing all nodes, their status, inputs, outputs, and child agent executions. Max recursion depth: 10.

Retrieves the complete execution tree showing all nodes, their status, and hierarchy.

## Usage

<CodeGroup>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_TOKEN" \
    https://app.splox.io/api/v1/workflow-requests/{workflow_request_id}/execution-tree
  ```

  ```python Python theme={null}
  from splox import SploxClient

  client = SploxClient(api_key="YOUR_API_KEY")
  tree = client.workflows.get_execution_tree("WORKFLOW_REQUEST_ID")
  print(f"Status: {tree.execution_tree.status}")
  for node in tree.execution_tree.nodes:
      print(f"  [{node.status}] {node.node_label} ({node.node_type})")
  ```

  ```typescript Node.js theme={null}
  import Splox from "splox";

  const client = new Splox("YOUR_API_KEY");
  const { execution_tree } = await client.workflows.getExecutionTree("WORKFLOW_REQUEST_ID");
  console.log(`Status: ${execution_tree.status}`);
  for (const node of execution_tree.nodes ?? []) {
    console.log(`  [${node.status}] ${node.node_label} (${node.node_type})`);
  }
  ```

  ```go Go theme={null}
  client := splox.NewClient("YOUR_API_KEY")
  tree, err := client.Workflows.GetExecutionTree(ctx, "WORKFLOW_REQUEST_ID")
  fmt.Printf("Status: %s\n", tree.ExecutionTree.Status)
  for _, node := range tree.ExecutionTree.Nodes {
      fmt.Printf("  [%s] %s (%s)\n", node.Status, node.NodeLabel, node.NodeType)
  }
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "execution_tree": {
    "workflow_request_id": "0199f123-d60e-7ffd-9131-4cc5ab040ee8",
    "status": "completed",
    "created_at": "2025-10-22T12:15:30Z",
    "completed_at": "2025-10-22T12:15:47Z",
    "nodes": [
      {
        "id": "0199f124-e70f-8gge-2242-5dd6bc151ff9",
        "node_id": "0199e002-b34c-8d9e-2345-678901bcdef0",
        "node_label": "Start",
        "node_type": "start",
        "status": "completed",
        "input_data": {},
        "output_data": { "user_id": "12345" },
        "created_at": "2025-10-22T12:15:32Z",
        "completed_at": "2025-10-22T12:15:33Z",
        "failed_at": null,
        "attempt_count": 1,
        "child_executions": [],
        "total_children": 0,
        "has_more_children": false
      },
      {
        "id": "0199f125-f81g-9hhf-3353-6ee7cd262gg0",
        "node_id": "0199e003-c45d-9e0f-3456-789012cdef01",
        "node_label": "Process Data",
        "node_type": "agent",
        "status": "completed",
        "input_data": { "user_id": "12345" },
        "output_data": { "result": "processed" },
        "created_at": "2025-10-22T12:15:34Z",
        "completed_at": "2025-10-22T12:15:45Z",
        "failed_at": null,
        "attempt_count": 1,
        "child_executions": [
          {
            "index": 0,
            "workflow_request_id": "0199f126-g92h-0iig-4464-7ff8de373hh1",
            "status": "completed",
            "label": "→ Agent B",
            "target_node_label": "Agent B",
            "created_at": "2025-10-22T12:15:35Z",
            "completed_at": "2025-10-22T12:15:44Z",
            "nodes": []
          }
        ],
        "total_children": 1,
        "has_more_children": false
      }
    ]
  }
}
```

## Node Status Values

* `pending` - Queued for execution
* `running` - Currently executing
* `completed` - Finished successfully
* `failed` - Execution failed
* `blocked` - Waiting for dependencies
* `stopped` - Manually stopped

## Use Cases

* **Debugging** - Visualize complete execution flow
* **Analytics** - Analyze workflow performance
* **Audit logs** - Track what executed and when
* **Error analysis** - Find where execution failed

## Notes

<Info>
  **Authentication required:** Include Bearer token in Authorization header
</Info>

<Tip>
  Use this endpoint to build execution visualizations or debug complex multi-agent workflows.
</Tip>


## OpenAPI

````yaml GET /workflow-requests/{id}/execution-tree
openapi: 3.1.0
info:
  title: Splox API
  description: >-
    Run workflows, manage chats, receive events, and monitor execution via the
    Splox API
  version: 1.0.0
  contact:
    name: Splox Support
    email: support@splox.io
    url: https://community.splox.io
servers:
  - url: https://app.splox.io/api/v1
    description: Production API
security: []
tags:
  - name: MCP
    description: Discover MCP servers, manage connections, and execute MCP tools
  - name: Workflows
    description: List, get, and inspect workflows, versions, and nodes
  - name: Workflow Requests
    description: Run workflows, monitor execution, and retrieve results
  - name: Events
    description: Receive external events via Event Hub webhooks
  - name: Chats
    description: Manage chat sessions for workflow interactions
paths:
  /workflow-requests/{id}/execution-tree:
    get:
      tags:
        - Workflow Requests
      summary: Get Workflow Execution Tree
      description: >-
        Retrieves the complete execution tree showing all nodes, their status,
        inputs, outputs, and child agent executions. Max recursion depth: 10.
      operationId: getExecutionTree
      parameters:
        - name: id
          in: path
          required: true
          description: Workflow request ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Execution tree retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  execution_tree:
                    $ref: '#/components/schemas/ExecutionTree'
      security:
        - bearerAuth: []
components:
  schemas:
    ExecutionTree:
      type: object
      properties:
        workflow_request_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
            - in_progress
            - waiting
            - completed
            - failed
            - stopped
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionNode'
    ExecutionNode:
      type: object
      properties:
        id:
          type: string
          format: uuid
        node_id:
          type: string
          format: uuid
        node_label:
          type: string
        node_type:
          type: string
        status:
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - failed
            - blocked
            - skipped
            - stopped
            - waiting
        input_data:
          type: object
          nullable: true
        output_data:
          type: object
          nullable: true
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
        failed_at:
          type: string
          format: date-time
          nullable: true
        attempt_count:
          type: integer
        child_executions:
          type: array
          items:
            $ref: '#/components/schemas/ChildExecution'
        total_children:
          type: integer
        has_more_children:
          type: boolean
    ChildExecution:
      type: object
      properties:
        index:
          type: integer
        workflow_request_id:
          type: string
          format: uuid
        status:
          type: string
        label:
          type: string
        target_node_label:
          type: string
        created_at:
          type: string
          format: date-time
        completed_at:
          type: string
          format: date-time
          nullable: true
        nodes:
          type: array
          items:
            $ref: '#/components/schemas/ExecutionNode'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API token generated from your Splox account settings. Create tokens at
        https://app.splox.io/account?tab=settings

````