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

# Get container logs

> Retrieve logs for a specific container



## OpenAPI

````yaml https://console.gputrader.io/assets/gputrader-api.json get /rentals/{rentalId}/stacks/{stackId}/containers/{containerId}/logs
openapi: 3.1.1
info:
  title: GPU Trader API
  version: 0.4.16
  description: This is the Swagger/OpenAPI-compatible GPUTrader API documentation
servers:
  - url: https://api.gputrader.io/v1
security: []
tags: []
paths:
  /rentals/{rentalId}/stacks/{stackId}/containers/{containerId}/logs:
    get:
      tags:
        - Rentals
      summary: Get container logs
      description: Retrieve logs for a specific container
      parameters:
        - in: path
          name: rentalId
          required: true
          schema:
            type: string
          description: Rental ID
        - in: path
          name: stackId
          required: true
          schema:
            type: string
          description: Stack ID
        - in: path
          name: containerId
          required: true
          schema:
            type: string
          description: Container ID
      responses:
        '200':
          description: Successfully retrieved container logs
          content:
            application/json:
              schema:
                type: string
                description: >-
                  Container logs with Docker stream headers removed and empty
                  lines filtered
        '404':
          description: Rental, stack, or container not found
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````