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

# Poll a run

> Current state of one run. Returns progress while it is going and a summary once it finishes, so a CI job can poll this until `status` leaves `running`.



## OpenAPI

````yaml GET /api/experiments/runs/{runId}
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/experiments/runs/{runId}:
    get:
      tags:
        - Experiments
      summary: Poll a run
      description: >-
        Current state of one run. Returns progress while it is going and a
        summary once it finishes, so a CI job can poll this until `status`
        leaves `running`.
      operationId: getApiExperimentsRunsByRunId
      parameters:
        - schema:
            type: string
          in: path
          name: runId
          required: true
      responses:
        '200':
          description: Run state
          content:
            application/json:
              schema:
                type: object
                properties:
                  runId:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - running
                      - completed
                      - failed
                      - stopped
                  progress:
                    type: number
                    description: Cells finished so far
                  total:
                    type: number
                    description: Cells in the run
                  startedAt:
                    type: number
                    description: Unix milliseconds
                  finishedAt:
                    type: number
                    description: Unix milliseconds; set once the run is no longer running
                  summary:
                    type: object
                    properties:
                      runId:
                        type: string
                      totalCells:
                        type: number
                        description: Cells the run set out to execute
                      completedCells:
                        type: number
                      failedCells:
                        type: number
                      duration:
                        type: number
                        description: Wall-clock milliseconds
                      chDispatchFailures:
                        type: number
                        description: >-
                          Non-zero means some rows may be missing from the
                          stored results
                      timestamps:
                        type: object
                        properties:
                          startedAt:
                            type: number
                          finishedAt:
                            type: number
                          stoppedAt:
                            type: number
                        required:
                          - startedAt
                      targets:
                        type: array
                        items:
                          type: object
                          properties:
                            targetId:
                              type: string
                            name:
                              type: string
                            passed:
                              type: number
                            failed:
                              type: number
                            avgLatency:
                              type: number
                            totalCost:
                              type: number
                          required:
                            - targetId
                            - name
                            - passed
                            - failed
                            - avgLatency
                            - totalCost
                      evaluators:
                        type: array
                        items:
                          type: object
                          properties:
                            evaluatorId:
                              type: string
                            name:
                              type: string
                            passed:
                              type: number
                            failed:
                              type: number
                            passRate:
                              type: number
                            avgScore:
                              type: number
                          required:
                            - evaluatorId
                            - name
                            - passed
                            - failed
                            - passRate
                      totalPassed:
                        type: number
                      totalFailed:
                        type: number
                      passRate:
                        type: number
                      totalCost:
                        type: number
                      runUrl:
                        type: string
                        description: Link to the run in the LangWatch app
                    required:
                      - runId
                      - totalCells
                      - completedCells
                      - failedCells
                      - duration
                      - timestamps
                    description: Present when completed
                  error:
                    type: string
                    description: >-
                      Stable failure code, present when failed. Not display
                      copy: render your own wording keyed on it.
                  domainError:
                    type: object
                    properties:
                      code:
                        type: string
                        description: Stable failure code; branch on this
                      kind:
                        type: string
                        description: Deprecated alias of code, for older clients
                      message:
                        type: string
                      meta:
                        type: object
                        additionalProperties: {}
                      httpStatus:
                        type: number
                      fault:
                        type: string
                        description: >-
                          Who the failure is attributable to: customer,
                          platform, provider
                      traceId:
                        type: string
                      tips:
                        type: array
                        items:
                          type: string
                      docsUrl:
                        type: string
                    required:
                      - code
                      - kind
                    description: The full failure envelope, when the failure carried one
                  traceId:
                    type: string
                    description: >-
                      Trace id for failures that carry no code, to quote in
                      support
                required:
                  - runId
                  - status
                  - progress
                  - total
        '401':
          description: Missing or invalid API key, or the key lacks the permission
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Stable failure code; branch on this
                  message:
                    type: string
                  fault:
                    type: string
                    description: >-
                      Who the failure is attributable to: customer, platform,
                      provider
                  tips:
                    type: array
                    items:
                      type: string
                  docsUrl:
                    type: string
                required:
                  - error
                additionalProperties: true
        '404':
          description: No such experiment or run in this project
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Stable failure code; branch on this
                  message:
                    type: string
                  fault:
                    type: string
                    description: >-
                      Who the failure is attributable to: customer, platform,
                      provider
                  tips:
                    type: array
                    items:
                      type: string
                  docsUrl:
                    type: string
                required:
                  - error
                additionalProperties: true
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````