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

# Get pipeline logs

> Fetch recent log lines from the pipeline runtime, grouped by pod.

<Info>
  Requires a **ServiceKey**. See [Service Keys](/goldrush-pipeline-api/service-keys).
</Info>

Returns the concatenated tail of stdout/stderr for each pod backing the pipeline worker. The response is shaped as `data.pods[]`, with one entry per replica - single-replica pipelines return a one-element array.

<Note>
  The `logs` field on each pod is a single string, not a list of structured log entries. Newlines separate lines. Filter, parse, or tail it client-side.
</Note>

<Warning>
  If the pod is still being scheduled, has just crashed, or has been replaced, the `logs` field may contain a runtime tail error such as `unable to upgrade connection: container not found`. The envelope-level `error` field is still `false` in this case - the API call itself succeeded, but there was nothing to tail. Retry after the pipeline reaches `RUNNING` via [`status`](/api-reference/pipeline-api/get-pipeline-status).
</Warning>

Useful when:

* A `POST` succeeded but [`status`](/api-reference/pipeline-api/get-pipeline-status) is `FAILED`.
* [`destination-health`](/api-reference/pipeline-api/get-pipeline-destination-health) reports unhealthy and you need the underlying connection error.
* Records are not arriving at the destination and you want to see normalization or transform errors.


## OpenAPI

````yaml GET /platform/pipeline-api/{pipeline_id}/logs/
openapi: 3.1.0
info:
  title: GoldRush Pipeline API
  version: 1.0.0
  description: >-
    REST API for programmatic CRUD over GoldRush pipelines. Authentication uses
    a ServiceKey - regular GoldRush API keys are not accepted on these
    endpoints.
servers:
  - url: https://api.covalenthq.com
security:
  - serviceKeyAuth: []
paths:
  /platform/pipeline-api/{pipeline_id}/logs/:
    parameters:
      - name: pipeline_id
        in: path
        required: true
        description: The pipeline identifier, prefixed with `pipe_`.
        schema:
          type: string
    get:
      tags:
        - pipelines
      summary: Get pipeline logs
      description: >-
        Fetch recent log lines emitted by the pipeline runtime. Useful for
        debugging deployment failures and destination connection errors.
      operationId: getPipelineLogs
      responses:
        '200':
          description: Recent pipeline logs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PipelineLogsEnvelope'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PipelineLogsEnvelope:
      type: object
      properties:
        data:
          type: object
          properties:
            uid:
              type: string
              description: Internal runtime identifier of the pipeline worker.
              example: covalent-postgres-pipe-fa28e4ef28fa4f7b9ffc62e162d
            pods:
              type: array
              items:
                $ref: '#/components/schemas/PipelineLogEntry'
              description: >-
                One entry per pod backing the pipeline worker. Single-replica
                pipelines return a one-element array.
        error:
          type: boolean
        error_message:
          type: string
          nullable: true
        error_code:
          type: string
          nullable: true
    PipelineLogEntry:
      type: object
      description: Logs for a single pod backing the pipeline worker.
      properties:
        pod:
          type: string
          description: Name of the Kubernetes pod.
          example: pipeline-covalent-postgres-pipe-fa28e4ef28fa4f7b9ffc62e162dmlm2
        logs:
          type: string
          description: >-
            Concatenated log output for the pod (kubectl-tail style). May
            contain runtime tail errors such as `container not found` if the pod
            is mid-deployment or has crashed; in that case the envelope-level
            `error` field is still `false`.
    ErrorEnvelope:
      type: object
      properties:
        data:
          type: object
          nullable: true
        error:
          type: boolean
        error_message:
          type: string
        error_code:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid ServiceKey.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    Forbidden:
      description: >-
        The credential supplied is not a ServiceKey, or the ServiceKey does not
        have access to this pipeline.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    NotFound:
      description: Pipeline does not exist or is not visible to this ServiceKey.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
  securitySchemes:
    serviceKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: ServiceKey
      description: >-
        Pipeline REST endpoints require a ServiceKey. Regular GoldRush API keys
        are rejected with 403. See [Service
        Keys](/goldrush-pipeline-api/service-keys).

````