An app's CPU and memory usage.
GET
/api/v1/projects/{project}/environments/{environment}/apps/{app}/metrics
const url = 'https://example.com/api/v1/projects/example/environments/example/apps/example/metrics';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/projects/example/environments/example/apps/example/metricsParameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project
required
string
Project name
environment
required
string
Environment short name
app
required
string
App name
Query Parameters
Section titled “Query Parameters”window
string
1h (live samples) or 7d (hourly averages and peaks).
Responses
Section titled “Responses”Media typeapplication/json
object
window
required
string
available
required
False when there is nothing to show: never read as zero.
boolean
reason
Why it is unavailable.
string | null
points
required
Array<object>
object
at
required
RFC 3339.
string
cpuMillis
required
integer format: int64
memoryBytes
required
integer format: int64
cpuMax
The hour’s peaks (7d only).
integer | null format: int64
memoryMax
integer | null format: int64
pods
Pods sampled (1h only).
integer | null format: int32
Examplegenerated
{ "window": "example", "available": true, "reason": "example", "points": [ { "at": "example", "cpuMillis": 1, "memoryBytes": 1, "cpuMax": 1, "memoryMax": 1, "pods": 1 } ]}Media typeapplication/json
Problem Details body.
object
code
required
Stable machine-readable code, e.g. forbidden.
string
title
required
Short human readable title.
string
status
required
HTTP status.
integer format: int32
detail
Details, if safe to expose.
string | null
Example
{ "code": "forbidden"}