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

# Rerun execution

> Start a new execution of the same workflow version as the original. The new execution copies the original's inputs, agent profile, metadata and execution options, and records the original as its parent. Set inputs or agentProfileId in the body to replace the copied values. Files staged for the original execution are not copied.



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml post /executions/{executionId}/rerun
openapi: 3.1.0
info:
  title: Agent Service
  version: v1
servers:
  - description: V2 API
    url: https://odyssey.asteroid.ai/agents/v2
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
  - name: Environments
  - name: Schedules
  - name: Execution
  - name: Files
  - name: Profiles
  - name: Profile Groups
  - name: Agent Profiles
  - name: Agent Profile Pools
  - name: Workflows
  - name: Execution Batches
  - name: Scheduled Executions
  - name: Schema
  - name: Documentation
  - name: Context
  - name: Admin Customer Activity
  - name: Reference
  - name: Workflow Tags
  - name: Secrets
  - name: Vault
  - name: Workflow Versions
paths:
  /executions/{executionId}/rerun:
    post:
      tags:
        - Execution
      summary: Rerun execution
      description: >-
        Start a new execution of the same workflow version as the original. The
        new execution copies the original's inputs, agent profile, metadata and
        execution options, and records the original as its parent. Set inputs or
        agentProfileId in the body to replace the copied values. Files staged
        for the original execution are not copied.
      operationId: ExecutionRerun
      parameters:
        - description: The unique identifier of the execution to rerun
          in: path
          name: executionId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Agents.Execution.RerunExecutionRequest'
        description: Values that replace the copied ones
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agents.Workflow.ExecuteWorkflowResponse'
          description: >-
            The request has been accepted for processing, but processing has not
            yet completed.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.BadRequestErrorBody'
          description: The server could not understand the request due to invalid syntax.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.UnauthorizedErrorBody'
          description: Access is unauthorized.
        '402':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.PaymentRequiredErrorBody'
          description: Client error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.ForbiddenErrorBody'
          description: Access is forbidden.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.NotFoundErrorBody'
          description: The server cannot find the requested resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.InternalServerErrorBody'
          description: Server error
components:
  schemas:
    Common.uuid:
      format: uuid
      type: string
    Agents.Execution.RerunExecutionRequest:
      description: Values that replace the ones copied from the original execution
      properties:
        agentProfileId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: >-
            The ID of the agent profile to use. Replaces the original profile
            when set.
        inputs:
          description: >-
            Input variables for the new execution. Replaces the original inputs
            when set.
          type: object
          unevaluatedProperties: {}
      type: object
    Agents.Workflow.ExecuteWorkflowResponse:
      description: Response after starting workflow execution
      properties:
        executionId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: The ID of the newly created execution
      required:
        - executionId
      type: object
    Common.BadRequestErrorBody:
      properties:
        code:
          enum:
            - 400
          type: number
          x-enum-varnames:
            - BadRequest
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.UnauthorizedErrorBody:
      properties:
        code:
          enum:
            - 401
          type: number
          x-enum-varnames:
            - Unauthorized
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.PaymentRequiredErrorBody:
      properties:
        code:
          enum:
            - 402
          type: number
          x-enum-varnames:
            - PaymentRequired
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.ForbiddenErrorBody:
      properties:
        code:
          enum:
            - 403
          type: number
          x-enum-varnames:
            - Forbidden
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.NotFoundErrorBody:
      properties:
        code:
          enum:
            - 404
          type: number
          x-enum-varnames:
            - NotFound
        message:
          type: string
      required:
        - code
        - message
      type: object
    Common.InternalServerErrorBody:
      properties:
        code:
          enum:
            - 500
          type: number
          x-enum-varnames:
            - InternalServerError
        message:
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-Api-Key
      type: apiKey

````

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