# List sandbox metrics (/docs/api-reference/sandboxes/list-sandbox-metrics)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1301 · updated: 2026-07-30 -->
Related: [List sandboxes](/docs/api-reference/sandboxes/list-sandboxes.md), [Create sandbox](/docs/api-reference/sandboxes/create-sandbox.md), [List sandboxes (v2)](/docs/api-reference/sandboxes/list-sandboxes-v2.md), [Get sandbox logs](/docs/api-reference/sandboxes/get-sandbox-logs.md), [Get sandbox logs (v2)](/docs/api-reference/sandboxes/get-sandbox-logs-v2.md), [Get sandbox](/docs/api-reference/sandboxes/get-sandbox.md)

# List sandbox metrics

`GET /sandboxes/metrics`

List metrics for given sandboxes

## OpenAPI

```json
{
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "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": {
            "required": [
              "sandboxes"
            ],
            "properties": {
              "sandboxes": {
                "additionalProperties": {
                  "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",
                      "format": "int64",
                      "description": "Total disk space in bytes"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "type": "object"
          }
        }
      }
    },
    "400": {
      "description": "Bad request",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "401": {
      "description": "Authentication error",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    },
    "500": {
      "description": "Server error",
      "content": {
        "application/json": {
          "schema": {
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "format": "int32",
                "description": "Error code"
              },
              "message": {
                "type": "string",
                "description": "Error"
              }
            },
            "type": "object"
          }
        }
      }
    }
  }
}
```
