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

# Get Run

> Retrieve a specific Run by ID.



## OpenAPI

````yaml get /runs/{runId}
openapi: 3.1.0
info:
  title: Scorecard API
  description: REST API for Scorecard
  version: 1.0.0
servers:
  - url: https://api2.scorecard.io/api/v2
security:
  - ApiKeyAuth: []
paths:
  /runs/{runId}:
    get:
      summary: Get Run
      description: Retrieve a specific Run by ID.
      operationId: getRun
      parameters:
        - in: path
          name: runId
          description: The ID of the Run to retrieve.
          schema:
            type: string
            example: '135'
          required: true
      responses:
        '200':
          description: Successfully retrieved Run.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Run'
              examples:
                Run with Testset:
                  value:
                    id: '135'
                    testsetId: '246'
                    systemId: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    systemVersionId: 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0
                    metricIds:
                      - '789'
                      - '101'
                    metricVersionIds:
                      - 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0
                      - 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf1
                    numRecords: 10
                    numExpectedRecords: 10
                    numScores: 20
                    status: completed
                  summary: Run with Testset
                  description: Example response showing a completed Run with a Testset.
                Run without Testset:
                  value:
                    id: '136'
                    testsetId: null
                    systemId: null
                    systemVersionId: null
                    metricIds:
                      - '789'
                    metricVersionIds:
                      - 87654321-4d3b-4ae4-8c7a-4b6e2a19ccf0
                    numRecords: 5
                    numExpectedRecords: null
                    numScores: 3
                    status: running_scoring
                  summary: Run without Testset
                  description: >-
                    Example response showing a Run without a Testset that's
                    currently running scoring.
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '500':
          $ref: '#/components/responses/ServiceError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Scorecard from 'scorecard-ai';

            const client = new Scorecard({
              apiKey: 'My API Key',
            });

            const run = await client.runs.get('135');

            console.log(run.id);
        - lang: Python
          source: |-
            from scorecard_ai import Scorecard

            client = Scorecard(
                api_key="My API Key",
            )
            run = client.runs.get(
                "135",
            )
            print(run.id)
        - lang: cURL
          source: |-
            curl https://api2.scorecard.io/api/v2/runs/$RUN_ID \
                -H "Authorization: Bearer $SCORECARD_API_KEY"
components:
  schemas:
    Run:
      type: object
      properties:
        id:
          type: string
          description: The ID of the Run.
        testsetId:
          type:
            - string
            - 'null'
          default: null
          description: The ID of the Testset this Run is testing.
        systemId:
          type:
            - string
            - 'null'
          format: uuid
          description: The ID of the system this Run is using.
        systemVersionId:
          type:
            - string
            - 'null'
          format: uuid
          description: The ID of the system version this Run is using.
        metricIds:
          type: array
          items:
            type: string
          description: The IDs of the metrics this Run is using.
        metricVersionIds:
          type: array
          items:
            type: string
            format: uuid
          description: The IDs of the metric versions this Run is using.
        numRecords:
          type: number
          description: The number of records in the Run.
        numExpectedRecords:
          type:
            - number
            - 'null'
          description: >-
            The number of expected records in the Run. Determined by the number
            of testcases in the Run's Testset at the time of Run creation.
        numScores:
          type: number
          description: The number of completed scores in the Run so far.
        status:
          type: string
          enum:
            - pending
            - awaiting_execution
            - running_execution
            - awaiting_scoring
            - running_scoring
            - awaiting_human_scoring
            - completed
          description: The status of the Run.
      required:
        - id
        - testsetId
        - systemId
        - systemVersionId
        - metricIds
        - metricVersionIds
        - numRecords
        - numExpectedRecords
        - numScores
        - status
      description: A Run in the Scorecard system.
    ApiError:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
          x-stainless-any: true
      required:
        - code
        - message
        - details
      description: An API error.
  responses:
    UnauthenticatedError:
      description: Error indicating that the request is not authenticated.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            Authentication failure:
              value:
                code: UNAUTHORIZED
                message: Invalid or missing authentication token
                details: {}
              summary: Authentication failure
              description: >-
                Error returned when authentication credentials are invalid or
                missing.
    ServiceError:
      description: >-
        An internal service error indicating an issue with the Scorecard
        service.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            Internal error:
              value:
                code: INTERNAL_ERROR
                message: An unexpected error occurred while processing your request.
                details: {}
              summary: Internal error
              description: Generic error when an unexpected internal issue occurs.
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: starts with ak_

````