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

> Retrieve all stacks for a specific rental



## OpenAPI

````yaml https://console.gputrader.io/assets/gputrader-api.json get /rentals/{rentalId}/stacks
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:
    get:
      tags:
        - Rentals
      summary: List stacks
      description: Retrieve all stacks for a specific rental
      parameters:
        - in: path
          name: rentalId
          required: true
          schema:
            type: string
          description: Rental ID
      responses:
        '200':
          description: Successfully retrieved stacks
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    template:
                      type: object
                      description: Stack template configuration
                    createdAt:
                      type: string
                      format: date-time
                      description: Timestamp when the stack was created
                    updatedAt:
                      type: string
                      format: date-time
                      description: Timestamp when the stack was last updated
                    stackId:
                      type: string
                      description: Unique identifier for the stack
                    envId:
                      type: string
                      description: Environment identifier
                    pStackId:
                      type: number
                      description: Provider stack identifier
                    tunnels:
                      type: array
                      items:
                        type: object
                      description: Array of tunnel configurations
                    stackName:
                      type: string
                      description: Name of the stack
                    pStackName:
                      type: string
                      description: Provider stack name
                    userId:
                      type: string
                      description: ID of the user who created the stack
                    rentalId:
                      type: string
                      description: ID of the associated rental
                    errorMsg:
                      type: string
                      description: Error message if stack deployment failed
                    status:
                      type: string
                      enum:
                        - APPLYING
                        - ERROR
                        - REMOVING
                        - APPLIED
                      description: Current status of the stack
                  required:
                    - template
                    - createdAt
                    - stackId
                    - envId
                    - stackName
                    - pStackName
                    - userId
                    - rentalId
        '404':
          description: Rental not found
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````