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

# Get execution

> Get a single execution by ID with all details



## OpenAPI

````yaml https://odyssey.asteroid.ai/agents/v2/openapi.yaml get /agents/v2/executions/{executionId}
openapi: 3.1.0
info:
  title: Agent Service
  version: v1
servers:
  - url: https://odyssey.asteroid.ai
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: Insights
  - name: Workflow Versions
paths:
  /agents/v2/executions/{executionId}:
    get:
      tags:
        - Execution
      summary: Get execution
      description: Get a single execution by ID with all details
      operationId: Execution_get
      parameters:
        - in: path
          name: executionId
          required: true
          schema:
            $ref: '#/components/schemas/Common.uuid'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agents.Execution.ListItem'
          description: The request has succeeded.
        '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.
        '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.ListItem:
      description: Represents a single execution in a list view
      properties:
        agentId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          deprecated: true
          description: 'Deprecated: use workflowId. The ID of the workflow that was executed'
          x-hidden: true
        agentName:
          deprecated: true
          description: 'Deprecated: use workflowName. The workflow display name'
          type: string
        agentProfileId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          deprecated: true
          description: >-
            Deprecated: use profileId. The ID of the agent profile used for this
            execution (if any)
          x-hidden: true
        agentProfileName:
          deprecated: true
          description: >-
            Deprecated: use profileName. The name of the agent profile used for
            this execution (if any)
          type: string
          x-hidden: true
        browserLiveViewUrl:
          deprecated: true
          description: 'Deprecated: Use ''liveViewUrl'' instead.'
          type: string
        browserRecordingUrl:
          deprecated: true
          description: 'Deprecated: Use ''recordingUrl'' instead.'
          type: string
        comments:
          items:
            $ref: '#/components/schemas/Agents.Execution.Comment'
          type: array
        createdAt:
          format: date-time
          type: string
        duration:
          description: Execution duration in seconds (only present for terminal executions)
          format: double
          type: number
        executionOptions:
          allOf:
            - $ref: '#/components/schemas/Agents.Agent.ExecutionOptions'
          description: Per-execution runtime options (e.g. variant key)
        executionResult:
          $ref: '#/components/schemas/Agents.Execution.ExecutionResult'
        hasBeenRerun:
          type: boolean
        humanLabels:
          items:
            $ref: '#/components/schemas/Agents.Execution.HumanLabel'
          type: array
        id:
          $ref: '#/components/schemas/Common.uuid'
        inputs:
          type: object
          unevaluatedProperties: {}
        liveViewUrl:
          description: >-
            Live view URL for debugging (if an environment is active and
            execution is running)
          type: string
        metadata:
          type: object
          unevaluatedProperties:
            type: string
        organizationId:
          $ref: '#/components/schemas/Common.uuid'
        parentExecutionId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: ID of the execution this was rerun from, if applicable
        platformUrl:
          description: Deep link to this execution in the Asteroid platform UI
          type: string
        profileId:
          $ref: '#/components/schemas/Common.uuid'
        profileName:
          type: string
        purgedAt:
          description: >-
            When the retention purge removed this execution's data. Inputs,
            activities, files and recordings are gone; the row is a tombstone.
          format: date-time
          type: string
          x-hidden: true
        recordingUrl:
          description: >-
            Recording URL for playback (if an environment was used and execution
            is terminal)
          type: string
        scriptFailures:
          description: >-
            Script failures recorded for this execution (omitted when none
            occurred)
          items:
            $ref: '#/components/schemas/Agents.Execution.ScriptFailure'
          type: array
        startedAt:
          description: >-
            When the execution actually started running; absent while queued.
            createdAt means "enqueued at" for executions that waited in the
            queue.
          format: date-time
          type: string
        status:
          $ref: '#/components/schemas/Agents.Execution.Status'
        terminalAt:
          format: date-time
          type: string
        triggerContext:
          allOf:
            - $ref: '#/components/schemas/Agents.Execution.TriggerContext'
          description: >-
            Context about how and by whom this execution was triggered
            (discriminated by source)
        workflowId:
          $ref: '#/components/schemas/Common.uuid'
        workflowName:
          type: string
        workflowVersionId:
          $ref: '#/components/schemas/Common.uuid'
      required:
        - id
        - agentId
        - workflowId
        - workflowVersionId
        - status
        - createdAt
        - organizationId
        - agentName
        - workflowName
        - humanLabels
        - comments
        - hasBeenRerun
      type: object
    Common.BadRequestErrorBody:
      properties:
        code:
          enum:
            - 400
          type: number
          x-enum-varnames:
            - BadRequest
        detail:
          description: Explanation of this occurrence. Same text as message
          type: string
        errors:
          description: The parameters that failed validation, when known
          items:
            $ref: '#/components/schemas/Common.FieldError'
          type: array
        instance:
          description: The request path that produced the problem
          type: string
        message:
          type: string
        status:
          format: int32
          type: integer
        title:
          description: Short summary of the problem type
          type: string
        type:
          description: >-
            A URI that identifies the problem type. about:blank when the status
            says it all
          type: string
      required:
        - code
        - message
      type: object
    Common.UnauthorizedErrorBody:
      properties:
        code:
          enum:
            - 401
          type: number
          x-enum-varnames:
            - Unauthorized
        detail:
          description: Explanation of this occurrence. Same text as message
          type: string
        instance:
          description: The request path that produced the problem
          type: string
        message:
          type: string
        status:
          format: int32
          type: integer
        title:
          description: Short summary of the problem type
          type: string
        type:
          description: >-
            A URI that identifies the problem type. about:blank when the status
            says it all
          type: string
      required:
        - code
        - message
      type: object
    Common.ForbiddenErrorBody:
      properties:
        capability:
          description: The missing capability key, when reason is capability_required
          type: string
        code:
          enum:
            - 403
          type: number
          x-enum-varnames:
            - Forbidden
        detail:
          description: Explanation of this occurrence. Same text as message
          type: string
        instance:
          description: The request path that produced the problem
          type: string
        message:
          type: string
        reason:
          allOf:
            - $ref: '#/components/schemas/Common.ForbiddenReason'
          description: Why the request was refused, when the client can act on it
        status:
          format: int32
          type: integer
        title:
          description: Short summary of the problem type
          type: string
        type:
          description: >-
            A URI that identifies the problem type. about:blank when the status
            says it all
          type: string
      required:
        - code
        - message
      type: object
    Common.NotFoundErrorBody:
      properties:
        code:
          enum:
            - 404
          type: number
          x-enum-varnames:
            - NotFound
        detail:
          description: Explanation of this occurrence. Same text as message
          type: string
        instance:
          description: The request path that produced the problem
          type: string
        message:
          type: string
        status:
          format: int32
          type: integer
        title:
          description: Short summary of the problem type
          type: string
        type:
          description: >-
            A URI that identifies the problem type. about:blank when the status
            says it all
          type: string
      required:
        - code
        - message
      type: object
    Common.InternalServerErrorBody:
      properties:
        code:
          enum:
            - 500
          type: number
          x-enum-varnames:
            - InternalServerError
        detail:
          description: Explanation of this occurrence. Same text as message
          type: string
        instance:
          description: The request path that produced the problem
          type: string
        message:
          type: string
        status:
          format: int32
          type: integer
        title:
          description: Short summary of the problem type
          type: string
        type:
          description: >-
            A URI that identifies the problem type. about:blank when the status
            says it all
          type: string
      required:
        - code
        - message
      type: object
    Agents.Execution.Comment:
      description: User comment on an execution
      properties:
        content:
          type: string
        createdAt:
          format: date-time
          type: string
        executionId:
          $ref: '#/components/schemas/Common.uuid'
        id:
          $ref: '#/components/schemas/Common.uuid'
        public:
          type: boolean
        updatedAt:
          format: date-time
          type: string
        userId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: User who created the comment
      required:
        - id
        - executionId
        - userId
        - content
        - public
        - createdAt
      type: object
    Agents.Agent.ExecutionOptions:
      description: Per-execution runtime options.
      properties:
        softTimeoutMins:
          description: >-
            Soft timeout in minutes. When the execution has been running longer
            than this value, a message is injected on every subsequent step
            urging the agent to wrap up and produce output. Must be greater than
            0 and less than the agent's hard timeout (max_timeout_mins).
          minimum: 1
          type: integer
        variantKey:
          description: >-
            Identifies which variant this execution is for, scoping its shared
            files and scripts to a per-variant subdirectory under each node's
            shared folder. It does not change which workflow or version runs.
            Normalised to a filesystem-safe slug by the server. Requires the
            workflow to have `variant_mode` enabled, and a variant-mode workflow
            requires it on every execution.
          type: string
      type: object
    Agents.Execution.ExecutionResult:
      description: Execution result containing outcome, reasoning, and result data
      properties:
        createdAt:
          format: date-time
          type: string
        executionId:
          $ref: '#/components/schemas/Common.uuid'
        id:
          $ref: '#/components/schemas/Common.uuid'
        outcome:
          description: Outcome of the execution (success or failure)
          type: string
        reasoning:
          type: string
        result: {}
      required:
        - id
        - executionId
        - outcome
        - reasoning
        - result
        - createdAt
      type: object
    Agents.Execution.HumanLabel:
      description: Human-applied label for categorizing executions
      properties:
        color:
          description: 'Hex color code for the label (e.g., #FF5733)'
          type: string
        createdAt:
          format: date-time
          type: string
        id:
          $ref: '#/components/schemas/Common.uuid'
        name:
          type: string
        organizationId:
          $ref: '#/components/schemas/Common.uuid'
      required:
        - id
        - organizationId
        - name
        - color
        - createdAt
      type: object
    Agents.Execution.ScriptFailure:
      description: A single failed run of a scripted iris node's script
      properties:
        actionId:
          description: Identifier correlating this failure to its activity event
          type: string
        error:
          type: string
        failedLine:
          description: 1-based line number where the script failed, if known
          format: int32
          type: integer
        nodeId:
          type: string
        nodeName:
          type: string
        occurredAt:
          format: date-time
          type: string
        scriptFilepath:
          description: Relative path of the script file that failed
          type: string
        step:
          description: Execution step (iteration) at which the failure occurred
          format: int32
          type: integer
      required:
        - occurredAt
      type: object
    Agents.Execution.Status:
      enum:
        - queued
        - starting
        - running
        - paused
        - awaiting_confirmation
        - completed
        - cancelled
        - failed
        - paused_by_agent
      type: string
    Agents.Execution.TriggerContext:
      description: Discriminated union of trigger contexts (discriminated by source)
      discriminator:
        mapping:
          api: '#/components/schemas/Agents.Execution.APITriggerContext'
          schedule: '#/components/schemas/Agents.Execution.ScheduleTriggerContext'
          ui: '#/components/schemas/Agents.Execution.UITriggerContext'
          warmup: '#/components/schemas/Agents.Execution.WarmupTriggerContext'
        propertyName: source
      oneOf:
        - $ref: '#/components/schemas/Agents.Execution.APITriggerContext'
        - $ref: '#/components/schemas/Agents.Execution.UITriggerContext'
        - $ref: '#/components/schemas/Agents.Execution.ScheduleTriggerContext'
        - $ref: '#/components/schemas/Agents.Execution.WarmupTriggerContext'
      type: object
    Common.FieldError:
      description: A problem with one request parameter
      properties:
        detail:
          description: What is wrong with it
          type: string
        parameter:
          description: The query or path parameter name
          type: string
      required:
        - parameter
        - detail
      type: object
    Common.ForbiddenReason:
      enum:
        - capability_required
      type: string
    Agents.Execution.APITriggerContext:
      description: API-triggered execution context
      properties:
        actor:
          allOf:
            - $ref: '#/components/schemas/Common.Actor'
          description: >-
            Who started the execution. For an org key, read this and not
            `runner`: an org key has no user.
        apiKey:
          allOf:
            - $ref: '#/components/schemas/Agents.Execution.APIKeyRef'
          description: >-
            API key used for authentication (may be hidden for privacy when
            admin-triggered)
        runner:
          $ref: '#/components/schemas/Agents.Execution.TriggerRunner'
        source:
          enum:
            - api
          type: string
      required:
        - source
        - runner
      type: object
    Agents.Execution.ScheduleTriggerContext:
      description: Schedule-triggered execution context
      properties:
        schedule:
          $ref: '#/components/schemas/Agents.Execution.ScheduleRef'
        source:
          enum:
            - schedule
          type: string
      required:
        - source
        - schedule
      type: object
    Agents.Execution.UITriggerContext:
      description: UI-triggered execution context
      properties:
        actor:
          allOf:
            - $ref: '#/components/schemas/Common.Actor'
          description: Who started the execution.
        runner:
          $ref: '#/components/schemas/Agents.Execution.TriggerRunner'
        source:
          enum:
            - ui
          type: string
      required:
        - source
        - runner
      type: object
    Agents.Execution.WarmupTriggerContext:
      description: >-
        Warmup-triggered execution context: launched by a warm pool's
        replenisher
      properties:
        source:
          enum:
            - warmup
          type: string
        warmPoolId:
          allOf:
            - $ref: '#/components/schemas/Common.uuid'
          description: Warm pool whose replenisher launched the execution
      required:
        - source
        - warmPoolId
      type: object
    Common.Actor:
      description: >-
        Who did something: a person, an API key or one of Asteroid's services.
        Absent on a record made before actors were stored, on one a system job
        made, and when the caller may not see who it was.
      properties:
        id:
          description: The person's id, the key's id, or the service's name
          type: string
        kind:
          $ref: '#/components/schemas/Common.ActorKind'
      required:
        - kind
        - id
      type: object
    Agents.Execution.APIKeyRef:
      description: API key reference used for authentication
      properties:
        id:
          $ref: '#/components/schemas/Common.uuid'
        name:
          type: string
      required:
        - id
        - name
      type: object
    Agents.Execution.TriggerRunner:
      description: Runner information - who triggered the execution
      properties:
        email:
          type: string
        isAdmin:
          description: Whether the user is an admin (may be hidden for privacy)
          type: boolean
        userId:
          $ref: '#/components/schemas/Common.uuid'
      required:
        - userId
        - email
      type: object
    Agents.Execution.ScheduleRef:
      description: Schedule reference for schedule-triggered executions
      properties:
        cronExpression:
          description: Cron expression of the schedule
          type: string
        id:
          $ref: '#/components/schemas/Common.uuid'
      required:
        - id
        - cronExpression
      type: object
    Common.ActorKind:
      description: The kind of caller that did something
      enum:
        - person
        - api_key
        - service
      type: string
  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.