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

# Get Workflow Execution Compact

> Get a workflow execution.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json get /workspaces/{workspace_id}/workflow-executions/{execution_id}/compact
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/workflow-executions/{execution_id}/compact:
    get:
      tags:
        - workflow-executions
      summary: Get Workflow Execution Compact
      description: Get a workflow execution.
      operationId: workflow-executions-get_workflow_execution_compact
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - 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/WorkflowExecutionReadCompact_Any_Union_AgentOutput__Any__Any_
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    WorkflowExecutionReadCompact_Any_Union_AgentOutput__Any__Any_:
      properties:
        id:
          type: string
          title: Id
          description: The ID of the workflow execution
        run_id:
          type: string
          title: Run Id
          description: The run ID of the workflow execution
        start_time:
          type: string
          format: date-time
          title: Start Time
          description: The start time of the workflow execution
        execution_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Execution Time
          description: When this workflow run started or should start.
        close_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Close Time
          description: When the workflow was closed if closed.
        status:
          type: string
          enum:
            - RUNNING
            - COMPLETED
            - FAILED
            - CANCELED
            - TERMINATED
            - CONTINUED_AS_NEW
            - TIMED_OUT
        workflow_type:
          type: string
          title: Workflow Type
        task_queue:
          type: string
          title: Task Queue
        history_length:
          type: integer
          title: History Length
          description: Number of events in the history
        parent_wf_exec_id:
          anyOf:
            - type: string
              pattern: >-
                (wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/]((exec_[0-9a-zA-Z]+|exec-[\w-]+|(?:sch-[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-.*))
            - type: 'null'
          title: Parent Wf Exec Id
        trigger_type:
          $ref: '#/components/schemas/TriggerType'
        execution_type:
          $ref: '#/components/schemas/ExecutionType'
          description: >-
            Execution type (draft or published). Draft uses the draft workflow
            graph.
          default: published
        events:
          items:
            $ref: >-
              #/components/schemas/WorkflowExecutionEventCompact_Any_Union_AgentOutput__Any__Any_
          type: array
          title: Events
          description: Compact events in the workflow execution
        interactions:
          items:
            $ref: '#/components/schemas/InteractionRead'
          type: array
          title: Interactions
          description: The interactions in the workflow execution
      type: object
      required:
        - id
        - run_id
        - start_time
        - status
        - workflow_type
        - task_queue
        - history_length
        - trigger_type
        - events
      title: WorkflowExecutionReadCompact[Any, Union[AgentOutput, Any], Any]
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TriggerType:
      type: string
      enum:
        - manual
        - scheduled
        - webhook
        - case
      title: TriggerType
      description: Trigger type for a workflow execution.
    ExecutionType:
      type: string
      enum:
        - draft
        - published
      title: ExecutionType
      description: >-
        Execution type for a workflow execution.


        Distinguishes between draft (development) and published (production)
        executions.
    WorkflowExecutionEventCompact_Any_Union_AgentOutput__Any__Any_:
      properties:
        source_event_id:
          type: integer
          title: Source Event Id
        schedule_time:
          type: string
          format: date-time
          title: Schedule Time
        start_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start Time
        close_time:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Close Time
        curr_event_type:
          $ref: '#/components/schemas/WorkflowEventType'
        status:
          $ref: '#/components/schemas/WorkflowExecutionEventStatus'
        action_name:
          type: string
          title: Action Name
        action_ref:
          type: string
          title: Action Ref
        action_input:
          title: Action Input
        action_result:
          anyOf:
            - $ref: '#/components/schemas/AgentOutput'
            - {}
            - type: 'null'
          title: Action Result
        action_error:
          anyOf:
            - $ref: '#/components/schemas/EventFailure'
            - type: 'null'
        stream_id:
          type: string
          title: Stream Id
          default: <root>:0
        child_wf_exec_id:
          anyOf:
            - type: string
              pattern: >-
                (wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/]((exec_[0-9a-zA-Z]+|exec-[\w-]+|(?:sch-[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-.*))
            - type: 'null'
          title: Child Wf Exec Id
        child_wf_count:
          type: integer
          title: Child Wf Count
          default: 0
        loop_index:
          anyOf:
            - type: integer
            - type: 'null'
          title: Loop Index
        while_iteration:
          anyOf:
            - type: integer
            - type: 'null'
          title: While Iteration
        while_continue:
          anyOf:
            - type: boolean
            - type: 'null'
          title: While Continue
        child_wf_wait_strategy:
          anyOf:
            - $ref: '#/components/schemas/WaitStrategy'
            - type: 'null'
        session:
          anyOf:
            - $ref: '#/components/schemas/Session_Any_'
            - type: 'null'
      type: object
      required:
        - source_event_id
        - schedule_time
        - curr_event_type
        - status
        - action_name
        - action_ref
      title: WorkflowExecutionEventCompact[Any, Union[AgentOutput, Any], Any]
    InteractionRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        type:
          $ref: '#/components/schemas/InteractionType'
        status:
          $ref: '#/components/schemas/InteractionStatus'
        request_payload:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Request Payload
        response_payload:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Response Payload
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expires At
        wf_exec_id:
          type: string
          pattern: >-
            (wf-[0-9a-f]{32}|wf_[0-9a-zA-Z]+)[:/]((exec_[0-9a-zA-Z]+|exec-[\w-]+|(?:sch-[0-9a-f]{32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})-.*))
          title: Wf Exec Id
        actor:
          anyOf:
            - type: string
            - type: 'null'
          title: Actor
        action_ref:
          type: string
          title: Action Ref
        action_type:
          type: string
          title: Action Type
      type: object
      required:
        - id
        - created_at
        - updated_at
        - type
        - status
        - request_payload
        - response_payload
        - wf_exec_id
        - actor
        - action_ref
        - action_type
      title: InteractionRead
      description: Model for reading an interaction.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    WorkflowEventType:
      type: string
      enum:
        - WORKFLOW_EXECUTION_STARTED
        - WORKFLOW_EXECUTION_COMPLETED
        - WORKFLOW_EXECUTION_FAILED
        - WORKFLOW_EXECUTION_TERMINATED
        - WORKFLOW_EXECUTION_CANCELED
        - WORKFLOW_EXECUTION_CONTINUED_AS_NEW
        - WORKFLOW_EXECUTION_TIMED_OUT
        - ACTIVITY_TASK_SCHEDULED
        - ACTIVITY_TASK_STARTED
        - ACTIVITY_TASK_COMPLETED
        - ACTIVITY_TASK_FAILED
        - ACTIVITY_TASK_TIMED_OUT
        - ACTIVITY_TASK_CANCELED
        - CHILD_WORKFLOW_EXECUTION_STARTED
        - CHILD_WORKFLOW_EXECUTION_COMPLETED
        - CHILD_WORKFLOW_EXECUTION_FAILED
        - CHILD_WORKFLOW_EXECUTION_CANCELED
        - CHILD_WORKFLOW_EXECUTION_TERMINATED
        - START_CHILD_WORKFLOW_EXECUTION_INITIATED
        - CHILD_WORKFLOW_EXECUTION_TIMED_OUT
        - WORKFLOW_EXECUTION_SIGNALED
        - WORKFLOW_EXECUTION_UPDATE_ACCEPTED
        - WORKFLOW_EXECUTION_UPDATE_REJECTED
        - WORKFLOW_EXECUTION_UPDATE_COMPLETED
      title: WorkflowEventType
      description: The event types we care about.
    WorkflowExecutionEventStatus:
      type: string
      enum:
        - SCHEDULED
        - STARTED
        - COMPLETED
        - FAILED
        - CANCELED
        - TERMINATED
        - TIMED_OUT
        - UNKNOWN
        - DETACHED
      title: WorkflowExecutionEventStatus
    AgentOutput:
      properties:
        output:
          title: Output
        message_history:
          anyOf:
            - items:
                $ref: '#/components/schemas/ChatMessage'
              type: array
            - type: 'null'
          title: Message History
        duration:
          type: number
          title: Duration
        usage:
          anyOf:
            - $ref: '#/components/schemas/RunUsage'
            - type: 'null'
        session_id:
          type: string
          format: uuid
          title: Session Id
      type: object
      required:
        - output
        - duration
        - session_id
      title: AgentOutput
    EventFailure:
      properties:
        message:
          type: string
          title: Message
        cause:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Cause
        root_cause_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Root Cause Message
      type: object
      required:
        - message
      title: EventFailure
    WaitStrategy:
      type: string
      enum:
        - wait
        - detach
      title: WaitStrategy
    Session_Any_:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        events:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Events
          description: The events in the session.
      type: object
      required:
        - id
      title: Session[Any]
    InteractionType:
      type: string
      enum:
        - approval
        - response
      title: InteractionType
    InteractionStatus:
      type: string
      enum:
        - idle
        - pending
        - error
        - timed_out
        - completed
      title: InteractionStatus
    ChatMessage:
      properties:
        id:
          type: string
          title: Id
          description: Unique message identifier
        kind:
          $ref: '#/components/schemas/MessageKind'
          description: Message kind for rendering
          default: chat-message
        message:
          anyOf:
            - {}
            - $ref: '#/components/schemas/UserMessage'
            - $ref: '#/components/schemas/AssistantMessage'
            - $ref: '#/components/schemas/SystemMessage'
            - $ref: '#/components/schemas/ResultMessage'
            - $ref: '#/components/schemas/StreamEvent'
            - $ref: '#/components/schemas/RateLimitEvent'
            - type: 'null'
          title: Message
          description: The deserialized message (for kind=CHAT_MESSAGE)
        approval:
          anyOf:
            - $ref: '#/components/schemas/ApprovalRead'
            - type: 'null'
          description: >-
            Approval data for approval bubble rendering (for
            kind=APPROVAL_REQUEST/APPROVAL_DECISION)
        compaction:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Compaction
          description: Compaction status data for badge rendering (for kind=COMPACTION)
        cancelled:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Cancelled
          description: Turn-cancelled marker data (for kind=CANCELLED)
      type: object
      required:
        - id
      title: ChatMessage
      description: >-
        Model for a chat message with typed message payload.


        This model supports multiple message kinds:

        - kind=CHAT_MESSAGE: Contains message field with user/assistant content

        - kind=APPROVAL_REQUEST/APPROVAL_DECISION: Contains approval field with
        approval data

        - kind=COMPACTION: Contains compaction field with compaction status data

        - kind=CANCELLED: Contains cancelled field with turn-cancelled marker
        data
    RunUsage:
      properties:
        requests:
          type: integer
          title: Requests
          default: 0
        tool_calls:
          type: integer
          title: Tool Calls
          default: 0
        input_tokens:
          type: integer
          title: Input Tokens
          default: 0
        output_tokens:
          type: integer
          title: Output Tokens
          default: 0
      type: object
      title: RunUsage
      description: LLM usage associated with an agent run.
    MessageKind:
      type: string
      enum:
        - chat-message
        - approval-request
        - approval-decision
        - internal
        - compaction
        - cancelled
      title: MessageKind
      description: The type/kind of message stored in the chat.
    UserMessage:
      properties:
        content:
          anyOf:
            - type: string
            - items:
                anyOf:
                  - $ref: '#/components/schemas/TextBlock'
                  - $ref: '#/components/schemas/ThinkingBlock'
                  - $ref: '#/components/schemas/ToolUseBlock'
                  - $ref: '#/components/schemas/ToolResultBlock'
              type: array
          title: Content
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
        parent_tool_use_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Tool Use Id
        tool_use_result:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Use Result
      type: object
      required:
        - content
      title: UserMessage
    AssistantMessage:
      properties:
        content:
          items:
            anyOf:
              - $ref: '#/components/schemas/TextBlock'
              - $ref: '#/components/schemas/ThinkingBlock'
              - $ref: '#/components/schemas/ToolUseBlock'
              - $ref: '#/components/schemas/ToolResultBlock'
          type: array
          title: Content
        model:
          type: string
          title: Model
        parent_tool_use_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Tool Use Id
        error:
          anyOf:
            - type: string
              enum:
                - authentication_failed
                - billing_error
                - rate_limit
                - invalid_request
                - server_error
                - unknown
            - type: 'null'
          title: Error
        usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage
        message_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Message Id
        stop_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Stop Reason
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
      type: object
      required:
        - content
        - model
      title: AssistantMessage
    SystemMessage:
      properties:
        subtype:
          type: string
          title: Subtype
        data:
          additionalProperties: true
          type: object
          title: Data
      type: object
      required:
        - subtype
        - data
      title: SystemMessage
    ResultMessage:
      properties:
        subtype:
          type: string
          title: Subtype
        duration_ms:
          type: integer
          title: Duration Ms
        duration_api_ms:
          type: integer
          title: Duration Api Ms
        is_error:
          type: boolean
          title: Is Error
        num_turns:
          type: integer
          title: Num Turns
        session_id:
          type: string
          title: Session Id
        stop_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Stop Reason
        total_cost_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Total Cost Usd
        usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Usage
        result:
          anyOf:
            - type: string
            - type: 'null'
          title: Result
        structured_output:
          title: Structured Output
        model_usage:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Model Usage
        permission_denials:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Permission Denials
        errors:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Errors
        uuid:
          anyOf:
            - type: string
            - type: 'null'
          title: Uuid
      type: object
      required:
        - subtype
        - duration_ms
        - duration_api_ms
        - is_error
        - num_turns
        - session_id
      title: ResultMessage
    StreamEvent:
      properties:
        uuid:
          type: string
          title: Uuid
        session_id:
          type: string
          title: Session Id
        event:
          additionalProperties: true
          type: object
          title: Event
        parent_tool_use_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Parent Tool Use Id
      type: object
      required:
        - uuid
        - session_id
        - event
      title: StreamEvent
    RateLimitEvent:
      properties:
        rate_limit_info:
          $ref: '#/components/schemas/RateLimitInfo'
        uuid:
          type: string
          title: Uuid
        session_id:
          type: string
          title: Session Id
      type: object
      required:
        - rate_limit_info
        - uuid
        - session_id
      title: RateLimitEvent
    ApprovalRead:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        tool_call_id:
          type: string
          title: Tool Call Id
        tool_name:
          type: string
          title: Tool Name
        tool_call_args:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tool Call Args
        status:
          $ref: '#/components/schemas/ApprovalStatus'
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        decision:
          anyOf:
            - type: boolean
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Decision
        approved_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Approved By
        approved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Approved At
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - tool_call_id
        - tool_name
        - status
        - created_at
      title: ApprovalRead
      description: Response schema for approval data in chat timeline.
    TextBlock:
      properties:
        text:
          type: string
          title: Text
      type: object
      required:
        - text
      title: TextBlock
    ThinkingBlock:
      properties:
        thinking:
          type: string
          title: Thinking
        signature:
          type: string
          title: Signature
      type: object
      required:
        - thinking
        - signature
      title: ThinkingBlock
    ToolUseBlock:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        input:
          additionalProperties: true
          type: object
          title: Input
      type: object
      required:
        - id
        - name
        - input
      title: ToolUseBlock
    ToolResultBlock:
      properties:
        tool_use_id:
          type: string
          title: Tool Use Id
        content:
          anyOf:
            - type: string
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Content
        is_error:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Error
      type: object
      required:
        - tool_use_id
      title: ToolResultBlock
    RateLimitInfo:
      properties:
        status:
          type: string
          enum:
            - allowed
            - allowed_warning
            - rejected
          title: Status
        resets_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Resets At
        rate_limit_type:
          anyOf:
            - type: string
              enum:
                - five_hour
                - seven_day
                - seven_day_opus
                - seven_day_sonnet
                - overage
            - type: 'null'
          title: Rate Limit Type
        utilization:
          anyOf:
            - type: number
            - type: 'null'
          title: Utilization
        overage_status:
          anyOf:
            - type: string
              enum:
                - allowed
                - allowed_warning
                - rejected
            - type: 'null'
          title: Overage Status
        overage_resets_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Overage Resets At
        overage_disabled_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Overage Disabled Reason
        raw:
          additionalProperties: true
          type: object
          title: Raw
      type: object
      required:
        - status
      title: RateLimitInfo
    ApprovalStatus:
      type: string
      enum:
        - pending
        - approved
        - rejected
      title: ApprovalStatus
      description: Possible states for a deferred tool approval.
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````