> ## 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.

# List containers

> Retrieve a list of containers for a specific stack within a rental



## OpenAPI

````yaml https://console.gputrader.io/assets/gputrader-api.json get /rentals/{rentalId}/stacks/{stackId}/containers
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:
    get:
      tags:
        - Rentals
      summary: List containers
      description: Retrieve a list of containers for a specific stack within a rental
      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
      responses:
        '200':
          description: Successfully retrieved containers
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    Name:
                      type: string
                      description: Name of the container
                    Id:
                      type: string
                      description: Container ID
                    Created:
                      type: number
                      description: Unix timestamp of container creation
                    Labels:
                      type: array
                      description: Labels associated with the container
                      items:
                        type: string
                    Ports:
                      type: array
                      items:
                        type: object
                        properties:
                          PrivatePort:
                            type: number
                            description: Internal port number of the container
                          Type:
                            type: string
                            enum:
                              - tcp
                              - udp
                              - sctp
                            description: Protocol type of the port
                          IP:
                            type: string
                            description: IP address for the port binding
                          PublicPort:
                            type: number
                            description: External port number
                        required:
                          - PrivatePort
                          - Type
                    State:
                      type: string
                      description: Current state of the container
        '404':
          description: Rental or stack not found
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````