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

# Get migration run detail



## OpenAPI

````yaml /openapi/program.openapi.json get /surveys/{surveyId}/migration/runs/{runId}
openapi: 3.1.0
info:
  title: Questra Program API
  version: 0.0.1
  description: >-
    REST API for the Questra Program product. Browser users authenticate through
    Questra Auth SSO; automation uses workspace-scoped API keys (`Authorization:
    Bearer qpk_live_…`). API keys carry scopes enforced before handlers.
    Outbound webhooks follow Standard Webhooks (at-least-once delivery;
    consumers must be idempotent).
servers:
  - url: /v1
    description: Program API base path
security: []
paths:
  /surveys/{surveyId}/migration/runs/{runId}:
    get:
      tags:
        - Survey migration
      summary: Get migration run detail
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: surveyId
          in: path
        - schema:
            type: string
            minLength: 1
            description: Workflow SDK run id (`wrun_...`)
          required: true
          description: Workflow SDK run id (`wrun_...`)
          name: runId
          in: path
      responses:
        '200':
          description: Migration run detail
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowRunDetailResponse'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
components:
  schemas:
    WorkflowRunDetailResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/WorkflowRunDetail'
      required:
        - data
    ErrorBody:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        resource:
          type: string
        slug:
          type: string
        file_id:
          type: string
        endpoint_id:
          type: string
        event_id:
          type: string
        delivery_id:
          type: string
        api_key_id:
          type: string
        integration_id:
          type: string
        audit_id:
          type: string
        status:
          type: string
        details: {}
        question_ids:
          type: array
          items:
            type: string
        survey_ids:
          type: array
          items:
            type: string
        revisions:
          type: array
          items:
            type: number
      required:
        - error
    WorkflowRunDetail:
      type: object
      properties:
        run_id:
          type: string
          minLength: 1
          description: Workflow SDK run id (`wrun_...`).
        workflow_name:
          type: string
        display_name:
          type: string
        status:
          $ref: '#/components/schemas/WorkflowRunStatus'
        kind:
          $ref: '#/components/schemas/WorkflowKind'
        subject:
          $ref: '#/components/schemas/WorkflowSubject'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowProductStep'
          description: Product-level recursive steps from the workflow definition snapshot.
        sdk_steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStep'
          description: Raw Workflow SDK World steps (diagnostics). Prefer `steps` for UI.
        parallel_groups:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowParallelGroup'
          description: Nested fan-out workflows launched by a parent step. Empty when none.
        hooks:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowHook'
        output:
          type:
            - object
            - 'null'
          additionalProperties: {}
        error:
          $ref: '#/components/schemas/WorkflowError'
        stream:
          $ref: '#/components/schemas/WorkflowStream'
        created_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - run_id
        - workflow_name
        - display_name
        - status
        - kind
        - subject
        - steps
        - sdk_steps
        - parallel_groups
        - hooks
        - output
        - error
        - stream
        - created_at
        - started_at
        - completed_at
    WorkflowRunStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - cancelled
    WorkflowKind:
      type: string
      enum:
        - survey.programming
        - survey.programming.fan_out
        - survey.questionnaire_clarifications
        - survey.audit
        - survey.audit.remediate
        - survey.migration
        - survey.simulation
        - survey.path_walk
        - survey.behavior_review.regression
        - survey.behavior_review.replay
        - fine_tuning_template.populate
        - workspace.upstream_status_sync
        - workspace.onboarding_drip
        - survey.export_live_pulse
    WorkflowSubject:
      type: object
      properties:
        type:
          type: string
          enum:
            - survey
            - fine_tuning_template
            - workspace
        id:
          type: string
          minLength: 1
      required:
        - type
        - id
    WorkflowProductStep:
      type: object
      properties:
        id:
          type: string
        kind:
          type: string
          enum:
            - task
            - fanOut
            - gate
            - loop
            - fanOutMember
            - loopIteration
            - loopChild
        title:
          type: string
        status:
          $ref: '#/components/schemas/WorkflowProductStepStatus'
        condition:
          type: object
          properties:
            description:
              type: string
            pending:
              type: boolean
            reason:
              type: string
          required:
            - description
            - pending
        output: {}
        logs:
          type: array
          items:
            type: object
            properties:
              log:
                type: string
              payload: {}
              timestamp:
                type: string
            required:
              - log
              - timestamp
        error:
          $ref: '#/components/schemas/WorkflowError'
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        child_run_id:
          type:
            - string
            - 'null'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowProductStep'
          description: Nested child steps when this node fans out, loops, or gates.
      required:
        - id
        - kind
        - title
        - status
    WorkflowStep:
      type: object
      properties:
        step_id:
          type: string
          description: >-
            Unique World step instance id. Retries increment `attempt` on the
            same id.
        step_name:
          type: string
          description: >-
            Logical durable step name. Parallelism is not inferred from this
            field — see `parallel_groups`.
        display_name:
          type: string
        status:
          type: string
        attempt:
          type: integer
          minimum: 0
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        retry_after:
          type:
            - string
            - 'null'
          format: date-time
        error:
          allOf:
            - $ref: '#/components/schemas/WorkflowError'
            - description: Present when the World step ended in `failed`; null otherwise.
      required:
        - step_id
        - step_name
        - display_name
        - status
        - attempt
        - started_at
        - completed_at
        - retry_after
        - error
    WorkflowParallelGroup:
      type: object
      properties:
        group_id:
          type: string
          description: Stable id for this Parallel Group (typically the child run id).
        display_name:
          type: string
        child_run_id:
          type: string
          description: Nested Workflow SDK run id whose steps are this group.
        parent_step_id:
          type: string
          description: Parent World step id that launched the nested fan-out.
        status:
          $ref: '#/components/schemas/WorkflowRunStatus'
        steps:
          type: array
          items:
            $ref: '#/components/schemas/WorkflowStep'
        error:
          $ref: '#/components/schemas/WorkflowError'
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - group_id
        - display_name
        - child_run_id
        - parent_step_id
        - status
        - steps
        - error
        - started_at
        - completed_at
    WorkflowHook:
      type: object
      properties:
        hook_id:
          type: string
        kind:
          $ref: '#/components/schemas/WorkflowHookKind'
        state:
          type: string
          enum:
            - waiting
            - received
            - disposed
            - conflict
        resume_path:
          type:
            - string
            - 'null'
          description: >-
            Relative API path to resolve this hook when `state` is `waiting`
            (`POST .../hooks/{hookId}/resolve`).
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: {}
          description: Hook create metadata from the Workflow World (when available).
        created_at:
          type: string
          format: date-time
        resolved_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - hook_id
        - kind
        - state
        - resume_path
        - metadata
        - created_at
        - resolved_at
    WorkflowError:
      type:
        - object
        - 'null'
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
    WorkflowStream:
      type: object
      properties:
        url:
          type: string
      required:
        - url
    WorkflowProductStepStatus:
      type: string
      enum:
        - planned
        - waiting
        - running
        - completed
        - skipped
        - failed
    WorkflowHookKind:
      type:
        - string
        - 'null'
      enum:
        - target_selection
        - template_selection
        - null
      description: >-
        Program hook kind when known from World metadata/token or bindings; null
        if unrecognized.

````