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

# Get Execution Details

> Get detailed information about an execution including activity trace.

This endpoint retrieves comprehensive execution details including:
- Execution status and timing
- Activity execution trace with timeline
- Recent workflow events
- Link to Temporal Web UI

Args:
    execution_id: Execution UUID or Temporal workflow ID
    request: FastAPI request object (contains kubiya_token in state)
    organization: Current organization from auth
    db: Database session

Returns:
    WorkflowDetailsResponse with full execution details and activity trace

Raises:
    404: Execution not found
    403: Access denied (execution doesn't belong to organization)
    500: Failed to fetch execution details from Temporal



## OpenAPI

````yaml https://control-plane.kubiya.ai/api/openapi.json get /api/v1/executions/{execution_id}/details
openapi: 3.1.0
info:
  title: Agent Control Plane API
  description: Multi-tenant agent orchestration with Temporal workflows
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
tags:
  - name: health
    description: 🏥 **Health & Status** - Check API health and availability
  - name: authentication
    description: 🔐 **Authentication** - Token validation and auth management
  - name: agents
    description: 🤖 **Agents** - Create and manage AI agents with custom capabilities
  - name: skills
    description: 🛠️ **Tool Sets** - Manage agent skills and tool configurations
  - name: integrations
    description: 🔌 **Integrations** - Connect to external services (Kubiya managed)
  - name: custom-integrations
    description: >-
      ⚙️ **Custom Integrations** - User-defined integration instances with env
      vars, secrets, and files
  - name: integration-templates
    description: >-
      📦 **Integration Templates** - Pre-configured templates for common
      services (PostgreSQL, Redis, MongoDB, etc.)
  - name: secrets
    description: 🔑 **Secrets** - Secure credential storage and retrieval
  - name: teams
    description: 👥 **Teams** - Team management and collaboration
  - name: workflows
    description: 📊 **Workflows** - Multi-step automation and orchestration
  - name: executions
    description: ▶️ **Executions** - Track and monitor workflow runs
  - name: jobs
    description: ⏰ **Jobs** - Scheduled and webhook-triggered tasks
  - name: policies
    description: 🛡️ **Policies** - Access control and security policies
  - name: analytics
    description: 📈 **Analytics** - Usage metrics and performance monitoring
  - name: projects
    description: 📁 **Projects** - Project organization and management
  - name: environments
    description: 🌍 **Environments** - Environment configuration (dev, staging, prod)
  - name: models
    description: 🧠 **Models** - LLM model configuration and management
  - name: runtimes
    description: ⚡ **Runtimes** - Agent execution runtime environments
  - name: workers
    description: 👷 **Workers** - Worker registration and heartbeat monitoring
  - name: storage
    description: 💾 **Storage** - File storage and cloud integration
  - name: context-graph
    description: 🕸️ **Context Graph** - Knowledge graph and context management
  - name: temporal-workflows
    description: >-
      ⚙️ **Temporal Workflows** - Background workflows for context graph
      ingestion, connector operations, and scheduled jobs
  - name: templates
    description: 📝 **Templates** - Reusable configuration templates
paths:
  /api/v1/executions/{execution_id}/details:
    get:
      summary: Get Execution Details
      description: |-
        Get detailed information about an execution including activity trace.

        This endpoint retrieves comprehensive execution details including:
        - Execution status and timing
        - Activity execution trace with timeline
        - Recent workflow events
        - Link to Temporal Web UI

        Args:
            execution_id: Execution UUID or Temporal workflow ID
            request: FastAPI request object (contains kubiya_token in state)
            organization: Current organization from auth
            db: Database session

        Returns:
            WorkflowDetailsResponse with full execution details and activity trace

        Raises:
            404: Execution not found
            403: Access denied (execution doesn't belong to organization)
            500: Failed to fetch execution details from Temporal
      operationId: get_execution_details_api_v1_executions__execution_id__details_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/WorkflowDetailsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WorkflowDetailsResponse:
      properties:
        workflow_id:
          type: string
          title: Workflow Id
          description: Temporal workflow ID
        run_id:
          type: string
          title: Run Id
          description: Temporal run ID
        status:
          type: string
          title: Status
          description: Workflow status
        execution_id:
          type: string
          title: Execution Id
          description: Execution entity ID
        execution_status:
          type: string
          title: Execution Status
          description: Execution status from DB
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
          description: Workflow start time
        close_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Close Time
          description: Workflow close time
        execution_duration_ms:
          type: number
          title: Execution Duration Ms
          description: Execution duration in milliseconds
          default: 0
        task_queue:
          type: string
          title: Task Queue
          description: Task queue name
        workflow_type:
          type: string
          title: Workflow Type
          description: Workflow type
        attempt:
          type: integer
          title: Attempt
          description: Execution attempt number
          default: 1
        history_length:
          type: integer
          title: History Length
          description: History event count
          default: 0
        history_size_bytes:
          type: integer
          title: History Size Bytes
          description: History size in bytes
          default: 0
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
          description: Workflow input data
        temporal_web_url:
          type: string
          title: Temporal Web Url
          description: Temporal Web UI URL
        recent_events:
          items:
            $ref: '#/components/schemas/WorkflowEvent'
          type: array
          title: Recent Events
          description: Recent workflow events
        trace:
          $ref: '#/components/schemas/WorkflowTrace'
          description: Workflow execution trace
      type: object
      required:
        - workflow_id
        - run_id
        - status
        - execution_id
        - execution_status
        - task_queue
        - workflow_type
        - temporal_web_url
        - trace
      title: WorkflowDetailsResponse
      description: Detailed workflow information
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkflowEvent:
      properties:
        event_id:
          type: integer
          title: Event Id
          description: Event ID
        event_type:
          type: string
          title: Event Type
          description: Event type
        event_time:
          type: string
          format: date-time
          title: Event Time
          description: Event timestamp
        details:
          additionalProperties: true
          type: object
          title: Details
          description: Event details
      type: object
      required:
        - event_id
        - event_type
        - event_time
      title: WorkflowEvent
      description: Individual workflow history event
    WorkflowTrace:
      properties:
        activities:
          items:
            $ref: '#/components/schemas/ActivityExecution'
          type: array
          title: Activities
          description: List of activity executions
        timeline:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Timeline
          description: Timeline events for visualization
        total_activities:
          type: integer
          title: Total Activities
          description: Total number of activities
        completed_activities:
          type: integer
          title: Completed Activities
          description: Number of completed activities
          default: 0
        failed_activities:
          type: integer
          title: Failed Activities
          description: Number of failed activities
          default: 0
      type: object
      required:
        - activities
        - timeline
        - total_activities
      title: WorkflowTrace
      description: Execution trace with activities and timeline
    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
    ActivityExecution:
      properties:
        activity_id:
          type: string
          title: Activity Id
          description: Activity ID
        activity_type:
          type: string
          title: Activity Type
          description: Activity type/name
        status:
          type: string
          title: Status
          description: 'Activity status: scheduled, started, completed, failed, timed_out'
        scheduled_time:
          type: string
          format: date-time
          title: Scheduled Time
          description: Activity scheduled timestamp
        started_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Started Time
          description: Activity start timestamp
        completed_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed Time
          description: Activity completion timestamp
        duration_ms:
          anyOf:
            - type: number
            - type: 'null'
          title: Duration Ms
          description: Activity duration in milliseconds
        attempt:
          type: integer
          title: Attempt
          description: Attempt number
          default: 1
        worker_identity:
          anyOf:
            - type: string
            - type: 'null'
          title: Worker Identity
          description: Worker that executed this activity
        failure_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Failure Message
          description: Failure message if activity failed
        input:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Input
          description: Activity input data
        result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Result
          description: Activity result data
      type: object
      required:
        - activity_id
        - activity_type
        - status
        - scheduled_time
      title: ActivityExecution
      description: Individual activity execution within a workflow
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your Kubiya API token (format: Bearer <token>)'

````