Get application metrics
Get an application’s CPU, RAM and network history with GET /v2/apps//metrics: the last 24 hours every 5 or 10 minutes, or 7 days hourly on Pro and Enterprise.
GET
Get application metrics
string
required
The API key for your account. You can find this in your account settings.
apps:read scope.
This endpoint returns historical resource usage rather than the current snapshot: up to 288 data points covering the last 24 hours, sampled every 5 minutes, for CPU, RAM, and network. Applications with less than 512 MB of RAM are sampled every 10 minutes (up to 144 points). On Pro and Enterprise plans, range=7d returns the last 7 days of applications with 512 MB or more instead, one point per hour with the hour’s average and peak. Points come newest first. Use it to render a usage chart or to spot trends over time; for the application’s current live numbers, use Get Application Status or the status events on Real-time Logs instead.
Results are cached for 2.5 minutes per (owner, application) (10 minutes for 7d), and the endpoint is rate limited to 10 requests every 5 seconds per user, with a short block once that cap is hit.
Parameters
string
required
The ID of the application. You can find this in the URL of your application’s dashboard.
string
default:"24h"
The history window:
24h (one point every 5 minutes, or every 10 minutes below 512 MB of RAM) or 7d (one point per hour, Pro and Enterprise plans, applications with 512 MB or more). Otherwise, 7d returns the last 24 hours instead of an error.Response
string
Indicates whether the call was successful:
success if it was, error if not.array
The contents of the response.
Common errors
Related
- CLI:
squarecloud app metrics - SDKs:
api.apps.metrics()(JavaScript),client.apps.metrics()(Python),c.Apps.Metrics()(Go)

