Skip to main content
AgentVista stores metrics ingested via the OTLP endpoint as named metric streams with typed data points. You can query those streams and filter by labels and time range through the dashboard API.
To ingest metrics data, use the OTLP ingestion endpoint. The endpoints on this page are read-only dashboard endpoints.

List metric streams

curl https://api.agentvista.dev/api/v1/dashboard/metrics/ \
  -H "Authorization: Bearer av_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
GET /dashboard/metrics/ Returns all named metric streams owned by the authenticated user, including the total number of data points stored for each metric. Results are ordered alphabetically by name.

Response — 200

An array of metric stream objects.
name
string
Metric name (e.g. "system.cpu.utilization").
metric_type
string
OTLP metric type (e.g. "gauge", "sum", "histogram").
unit
string
Unit of measurement (e.g. "1", "ms", "By").
description
string
Human-readable description from the OTLP payload.
data_point_count
number
Total number of data points stored for this metric stream.
Example response
[
  {
    "name": "system.cpu.utilization",
    "metric_type": "gauge",
    "unit": "1",
    "description": "CPU utilization as a fraction of capacity",
    "data_point_count": 14400
  },
  {
    "name": "http.server.request.duration",
    "metric_type": "histogram",
    "unit": "ms",
    "description": "HTTP server request duration",
    "data_point_count": 8291
  }
]

Query metric data points

curl "https://api.agentvista.dev/api/v1/dashboard/metrics/query?name=system.cpu.utilization&start=2024-01-15T00:00:00Z&end=2024-01-15T23:59:59Z&limit=500" \
  -H "Authorization: Bearer av_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
GET /dashboard/metrics/query Queries data points for a named metric stream with optional label and time range filters. Returns 404 if no metric with the given name exists for the authenticated user.

Query parameters

name
string
required
Metric name to query (e.g. "system.cpu.utilization").
labels
string
JSON-encoded label filter object (URL-encoded). Only data points whose labels contain all specified key-value pairs are returned. Example: {"host":"web-1"}. Uses subset matching — a data point with labels {"host":"web-1","region":"us-east"} matches a filter of {"host":"web-1"}.
start
string
ISO 8601 datetime. Only data points at or after this time are returned.
end
string
ISO 8601 datetime. Only data points at or before this time are returned.
limit
number
default:"1000"
Maximum number of data points to return. Data points are ordered newest-first.

Response — 200

name
string
Metric name.
metric_type
string
Metric type (e.g. "gauge", "sum", "histogram").
unit
string
Unit of measurement.
data_points
object[]
Matching data points ordered newest-first.
Example response
{
  "name": "system.cpu.utilization",
  "metric_type": "gauge",
  "unit": "1",
  "data_points": [
    {
      "value": 0.72,
      "timestamp": "2024-01-15T12:05:00Z",
      "labels": { "host": "web-1", "region": "us-east" }
    },
    {
      "value": 0.65,
      "timestamp": "2024-01-15T12:04:00Z",
      "labels": { "host": "web-1", "region": "us-east" }
    }
  ]
}