> ## 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.

# Preview Workflow Execution Rerun

> Match a past run's successful action results against a rerun target.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json post /workspaces/{workspace_id}/workflow-executions/{execution_id}/rerun/preview
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}/rerun/preview:
    post:
      tags:
        - workflow-executions
      summary: Preview Workflow Execution Rerun
      description: Match a past run's successful action results against a rerun target.
      operationId: workflow-executions-preview_workflow_execution_rerun
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowRerunRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRerunPlan'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    WorkflowRerunRequest:
      properties:
        use_draft:
          type: boolean
          title: Use Draft
          description: >-
            Rerun against the current draft. Set false to use a published
            version.
          default: true
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
          description: >-
            Published version to rerun against when use_draft is false. Null
            uses the current published version.
        fixed_action_refs:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Fixed Action Refs
          description: >-
            Action refs whose results to reuse. Null reuses every matching
            successful action; an empty list reruns everything.
        rerun_from_ref:
          anyOf:
            - type: string
            - type: 'null'
          title: Rerun From Ref
          description: >-
            Rerun from this action: it and every action downstream of it in the
            target run fresh.
      type: object
      title: WorkflowRerunRequest
    WorkflowRerunPlan:
      properties:
        source_execution_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: Source Execution Id
        workflow_id:
          type: string
          pattern: wf_[0-9a-zA-Z]+
          title: Workflow Id
        use_draft:
          type: boolean
          title: Use Draft
        version:
          anyOf:
            - type: integer
            - type: 'null'
          title: Version
        actions:
          items:
            $ref: '#/components/schemas/WorkflowRerunActionMatch'
          type: array
          title: Actions
        fixed_action_refs:
          items:
            type: string
          type: array
          title: Fixed Action Refs
        unmatched_refs:
          items:
            type: string
          type: array
          title: Unmatched Refs
        inputs_error:
          anyOf:
            - type: string
            - type: 'null'
          title: Inputs Error
      type: object
      required:
        - source_execution_id
        - workflow_id
        - use_draft
        - actions
        - fixed_action_refs
        - unmatched_refs
      title: WorkflowRerunPlan
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkflowRerunActionMatch:
      properties:
        ref:
          type: string
          title: Ref
        status:
          $ref: '#/components/schemas/WorkflowRerunActionStatus'
        source_action:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Action
        target_action:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Action
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
      type: object
      required:
        - ref
        - status
      title: WorkflowRerunActionMatch
    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
    WorkflowRerunActionStatus:
      type: string
      enum:
        - fixed
        - excluded
        - runs
        - not_in_target
        - action_changed
      title: WorkflowRerunActionStatus
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.