Skip to main content
POST
/
metrics
/
query
Execute a Prometheus query
curl --request POST \
  --url https://v1.api.altostrat.io/metrics/query \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "query": "avg(routeros_system_cpu_load)",
  "from": "now-24h",
  "to": "now",
  "step": "5m",
  "labels": {}
}
'
{}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
query
string
required
Minimum string length: 3
Example:

"avg(routeros_system_cpu_load)"

from
string
Example:

"now-24h"

to
string
Example:

"now"

step
string
Pattern: ^\d+[smhdwy]$
Example:

"5m"

labels
object

Response

The proxied Prometheus response.

The response is of type object.