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

# Get Execution

> Get details of a specific flow execution.

Returns complete execution information including:
- Execution status and timing
- Input variables and outputs
- Step-by-step execution log
- Error details if failed



## OpenAPI

````yaml get /api/v1/flows/executions/{execution_id}
openapi: 3.1.0
info:
  title: ThenaAgentStudio
  description: |2-

        ThenaCrew AI CRM Renewal System

        An intelligent platform to automate customer renewal insights and communications through multi-agent workflows.

        Key Features:
        * AI-powered renewal analysis
        * Personalized communication generation
        * Automated opportunity tracking
        * Multi-agent workflow orchestration
        
  version: 1.0.0
servers:
  - url: https://agent-studio.thena.ai
    description: Production server
  - url: http://localhost:8008
    description: Local development server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Agent management endpoints
  - name: Chat
    description: Chat and messaging endpoints
paths:
  /api/v1/flows/executions/{execution_id}:
    get:
      tags:
        - flow-execution
      summary: Get Execution
      description: |-
        Get details of a specific flow execution.

        Returns complete execution information including:
        - Execution status and timing
        - Input variables and outputs
        - Step-by-step execution log
        - Error details if failed
      operationId: get_execution_api_v1_flows_executions__execution_id__get
      parameters:
        - name: execution_id
          in: path
          required: true
          schema:
            type: string
            title: Execution Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlowExecution'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    FlowExecution:
      properties:
        id:
          type: string
          title: Id
          description: Unique execution ID
        flow_id:
          type: string
          title: Flow Id
          description: ID of the executed flow
        agent_id:
          type: string
          title: Agent Id
          description: ID of the agent that owns the flow
        organization_id:
          type: string
          title: Organization Id
          description: Organization ID
        execution_number:
          type: integer
          title: Execution Number
          description: Sequential execution number for this flow
        trigger_type:
          $ref: '#/components/schemas/ExecutionTriggerType'
          description: How the execution was triggered
        trigger_data:
          additionalProperties: true
          type: object
          title: Trigger Data
          description: Original trigger data
        variables:
          additionalProperties: true
          type: object
          title: Variables
          description: Execution variables
        priority:
          $ref: '#/components/schemas/ExecutionPriority'
          description: Execution priority
        status:
          $ref: '#/components/schemas/ExecutionStatus'
          description: Current execution status
        started_at:
          type: string
          format: date-time
          title: Started At
          description: When execution started
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: When execution completed
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
          description: Total execution duration in milliseconds
        timeout_seconds:
          type: integer
          title: Timeout Seconds
          description: Execution timeout
          default: 300
        steps:
          items:
            $ref: '#/components/schemas/FlowExecutionStep'
          type: array
          title: Steps
          description: Execution steps
        final_output:
          additionalProperties: true
          type: object
          title: Final Output
          description: Final execution output
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if execution failed
        error_details:
          additionalProperties: true
          type: object
          title: Error Details
          description: Detailed error information
        retry_count:
          type: integer
          title: Retry Count
          description: Number of retries attempted
          default: 0
        max_retries:
          type: integer
          title: Max Retries
          description: Maximum number of retries
          default: 3
        parent_execution_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Execution Id
          description: Parent execution if this is a retry
        tokens_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tokens Used
          description: Total tokens used in LLM calls
        tool_calls_count:
          type: integer
          title: Tool Calls Count
          description: Number of tool calls made
          default: 0
        cost_estimate:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost Estimate
          description: Estimated cost in USD
        performance_metrics:
          additionalProperties: true
          type: object
          title: Performance Metrics
          description: Performance metrics
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Additional execution metadata
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When record was created
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When record was last updated
      type: object
      required:
        - flow_id
        - agent_id
        - organization_id
        - execution_number
        - trigger_type
        - priority
        - status
        - started_at
      title: FlowExecution
      description: Complete flow execution record.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExecutionTriggerType:
      type: string
      enum:
        - manual
        - event
        - scheduled
        - api
        - webhook
        - test
      title: ExecutionTriggerType
      description: How the execution was triggered.
    ExecutionPriority:
      type: string
      enum:
        - low
        - normal
        - high
        - urgent
      title: ExecutionPriority
      description: Execution priority levels.
    ExecutionStatus:
      type: string
      enum:
        - pending
        - queued
        - running
        - completed
        - failed
        - cancelled
        - timeout
        - retrying
      title: ExecutionStatus
      description: Flow execution status enumeration.
    FlowExecutionStep:
      properties:
        step_id:
          type: string
          title: Step Id
          description: Unique step identifier
        step_name:
          type: string
          title: Step Name
          description: Human-readable step name
        step_type:
          type: string
          title: Step Type
          description: Type of step (tool, condition, loop, etc.)
        tool_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Tool Name
          description: Tool used in this step
        status:
          $ref: '#/components/schemas/ExecutionStatus'
          description: Step execution status
        input_data:
          additionalProperties: true
          type: object
          title: Input Data
          description: Input data for the step
        output_data:
          additionalProperties: true
          type: object
          title: Output Data
          description: Output data from the step
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
          description: Error message if step failed
        started_at:
          type: string
          format: date-time
          title: Started At
          description: When the step started
        completed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed At
          description: When the step completed
        duration_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration Ms
          description: Step duration in milliseconds
        retry_count:
          type: integer
          title: Retry Count
          description: Number of retries attempted
          default: 0
        metadata:
          additionalProperties: true
          type: object
          title: Metadata
          description: Step-specific metadata
      type: object
      required:
        - step_id
        - step_name
        - step_type
        - status
        - started_at
      title: FlowExecutionStep
      description: Individual step in flow execution.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````