Skip to main content
POST
/
projects
/
{project_reference}
/
metrics
/
query
Query Project Metrics
curl --request POST \
  --url https://api.veryfront.com/projects/{project_reference}/metrics/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "metric": "<string>",
  "start": "<string>",
  "end": "<string>",
  "step": "60s",
  "aggregation": "none",
  "labels": {}
}
'
{
  "series": [
    {
      "metric": "<string>",
      "labels": {},
      "points": [
        {
          "timestamp": "<string>",
          "value": 123
        }
      ]
    }
  ],
  "stats": {
    "query_time_ms": 123
  }
}

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.

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 service_name or status_code.

Response

Metric query results

series
object[]
required

List of series associated with this tool result.

stats
object
required

Structured stats details associated with this tool result.