Skip to main content
POST
Query project metrics

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

project_reference
string
required

Project slug or UUID. The resolved project is used to scope all metric reads server-side.

Body

application/json
metric
string
required

Prometheus metric name. Raw PromQL is not accepted.

Required string length: 1 - 200
start
string

Start time (ISO 8601). Defaults to 1 hour ago. Metrics are kept for 395 days and one query spans at most 31 days; an older start or a wider range returns 400.

end
string

End time (ISO 8601). Defaults to now.

step
string
default:60s

Prometheus query step, for example 60s.

Required string length: 1 - 20
aggregation
enum<string>
default:none

Aggregation to apply to the project-scoped metric selector.

Available options:
none,
sum,
avg,
min,
max,
count
labels
object

Optional allowlisted label filters such as environment, service_name or status_code. environment is the project environment on every metric: its name, matched case-insensitively, or preview for a branch. ai_gateway_* metrics carry it for calls made by a project run. Unknown, platform (deployment_environment) and project-scope labels are rejected.

Response

Metric query results

series
object[]
required
stats
object
required