> ## 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 environment usage

> Retrieve usage statistics for a specific environment



## OpenAPI

````yaml https://console.gputrader.io/assets/gputrader-api.json get /environments/{envId}/usage
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:
  /environments/{envId}/usage:
    get:
      tags:
        - Environments
      summary: Get environment usage
      description: Retrieve usage statistics for a specific environment
      parameters:
        - in: path
          name: envId
          required: true
          schema:
            type: string
          description: Environment ID
        - in: query
          name: from
          required: false
          schema:
            type: string
          description: Start date for usage data
        - in: query
          name: to
          required: false
          schema:
            type: string
          description: End date for usage data
      responses:
        '200':
          description: Successfully retrieved environment usage
          content:
            application/json:
              schema:
                type: object
                properties:
                  days:
                    type: array
                    items:
                      type: object
                    description: Daily usage data
                  percentChange:
                    type: object
                    properties:
                      count:
                        type: number
                        description: >-
                          Percentage change in rental count compared to previous
                          period
                        format: float
                      hours:
                        type: number
                        description: >-
                          Percentage change in hours used compared to previous
                          period
                        format: float
                      earned:
                        type: number
                        description: >-
                          Percentage change in earnings compared to previous
                          period
                        format: float
                  total:
                    type: object
                    properties:
                      count:
                        type: number
                        description: Total number of rentals in current period
                        format: integer
                      hours:
                        type: number
                        description: Total hours used in current period
                        format: float
                      earned:
                        type: number
                        description: Total earnings in current period
                        format: float
                    required:
                      - count
                      - hours
                      - earned
                  timezone:
                    type: string
                    description: Timezone used for the data
        '404':
          description: Environment not found
        '500':
          description: Internal server error
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````