# Get sandbox metrics (/docs/api-reference/sandboxes/get-sandbox-metrics)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 1420 · 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), [List sandbox metrics](/docs/api-reference/sandboxes/list-sandbox-metrics.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 metrics

`GET /sandboxes/{sandboxID}/metrics`

Get sandbox metrics

## OpenAPI

```json
{
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "parameters": [
    {
      "name": "sandboxID",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "start",
      "schema": {
        "type": "integer",
        "format": "int64",
        "minimum": 0
      },
      "description": "Unix timestamp for the start of the interval, in seconds, for which the metrics are returned."
    },
    {
      "in": "query",
      "name": "end",
      "schema": {
        "type": "integer",
        "format": "int64",
        "minimum": 0
      },
      "description": "Unix timestamp for the end of the interval, in seconds, for which the metrics are returned."
    }
  ],
  "responses": {
    "200": {
      "description": "Successfully returned the sandbox metrics",
      "content": {
        "application/json": {
          "schema": {
            "type": "array",
            "items": {
              "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"
            }
          }
        }
      }
    },
    "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"
          }
        }
      }
    },
    "404": {
      "description": "Not found",
      "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"
          }
        }
      }
    }
  }
}
```
