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

# Get run logs

> <p>Retrieve the combined logs for a run.</p>



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/indices/openapi.documented.yml get /v1beta/runs/{run_id}/logs
openapi: 3.1.0
info:
  title: Indices API
  description: 'The Indices REST API. See docs for details: https://docs.indices.io'
  version: 0.0.1
servers:
  - url: https://api.indices.io
security:
  - ApiKeyAuth: []
tags:
  - name: Tasks
    description: Create a task to repeatedly perform an action on an external website.
  - name: Runs
    description: Execute a task.
  - name: Secrets
    description: Manage secrets like login credentials and API keys.
paths:
  /v1beta/runs/{run_id}/logs:
    get:
      tags:
        - Runs
      summary: Get run logs
      description: <p>Retrieve the combined logs for a run.</p>
      operationId: getRunLogs
      parameters:
        - name: run_id
          in: path
          required: true
          schema:
            type: string
            description: The ID of the run to get logs for.
            title: Run Id
          description: The ID of the run to get logs for.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunLogs'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Indices from 'indicesio';

            const client = new Indices({
              apiKey: process.env['INDICES_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.runs.logs('run_id');

            console.log(response.logs);
        - lang: Python
          source: |-
            import os
            from indices import Indices

            client = Indices(
                api_key=os.environ.get("INDICES_API_KEY"),  # This is the default and can be omitted
            )
            response = client.runs.logs(
                "run_id",
            )
            print(response.logs)
components:
  schemas:
    RunLogs:
      properties:
        logs:
          type: string
          description: Run execution logs.
      type: object
      required:
        - logs
      title: RunLogs
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Enter your API key as the bearer token. Set header: `Authorization` to
        `Bearer <api_key>`

````