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

# List sandbox metrics

> List metrics for given sandboxes



## OpenAPI

````yaml /openapi-public.yml get /sandboxes/metrics
openapi: 3.1.0
info:
  title: E2B API
  version: 0.1.0
  description: >-
    Complete E2B developer API. Platform endpoints are served on api.e2b.app.
    Sandbox endpoints (envd) are served on the shared sandbox host
    (sandbox.e2b.app); target a specific sandbox with the E2b-Sandbox-Id and
    E2b-Sandbox-Port headers.
servers:
  - url: https://api.e2b.app
    description: E2B Platform API
security: []
tags:
  - name: Sandboxes
  - name: Templates
  - name: Tags
  - name: Volumes
  - name: Envd
  - name: Filesystem
  - name: Process
  - name: Teams
paths:
  /sandboxes/metrics:
    servers:
      - url: https://api.e2b.app
        description: E2B Platform API
    get:
      tags:
        - Sandboxes
      summary: List sandbox metrics
      description: List metrics for given sandboxes
      operationId: listSandboxesMetrics
      parameters:
        - name: sandbox_ids
          in: query
          required: true
          description: Comma-separated list of sandbox IDs to get metrics for
          explode: false
          schema:
            type: array
            items:
              type: string
            maxItems: 100
            uniqueItems: true
      responses:
        '200':
          description: Successfully returned all running sandboxes with metrics
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SandboxesWithMetrics'
        '400':
          $ref: '#/components/responses/400'
        '401':
          $ref: '#/components/responses/401'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SandboxesWithMetrics:
      required:
        - sandboxes
      properties:
        sandboxes:
          additionalProperties:
            $ref: '#/components/schemas/SandboxMetric'
      type: object
    SandboxMetric:
      description: Metric entry with timestamp and line
      required:
        - timestamp
        - timestampUnix
        - cpuCount
        - cpuUsedPct
        - memUsed
        - memTotal
        - memCache
        - diskUsed
        - diskTotal
      properties:
        timestamp:
          type: string
          format: date-time
          deprecated: true
          description: Timestamp of the metric entry
        timestampUnix:
          type: integer
          format: int64
          description: Timestamp of the metric entry in Unix time (seconds since epoch)
        cpuCount:
          type: integer
          format: int32
          description: Number of CPU cores
        cpuUsedPct:
          type: number
          format: float
          description: CPU usage percentage
        memUsed:
          type: integer
          format: int64
          description: Memory used in bytes
        memTotal:
          type: integer
          format: int64
          description: Total memory in bytes
        memCache:
          type: integer
          format: int64
          description: Cached memory (page cache) in bytes
        diskUsed:
          type: integer
          format: int64
          description: Disk used in bytes
        diskTotal:
          type: integer
          description: Total disk space in bytes
          format: int64
      type: object
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        message:
          type: string
          description: Error
      type: object
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '401':
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````