Deployments.ai Docs
Observability

Show trace or model metrics by time bucket, optionally grouped

GET /v1/observability/metrics · SDK getObservabilityMetrics · CLI deployments observability metrics

GET
/v1/observability/metrics

Requires observability:read.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Query Parameters

from?string

Inclusive window start (RFC 3339); defaults to to minus 24 hours.

Formatdate-time
to?string

Window end (RFC 3339); defaults to now.

Formatdate-time
interval?string

Bucket width; defaults to hour.

Value in"hour""day"
groupBy?string

Optional dimension. Agent dimensions aggregate finalized traces; model and provider aggregate model invocations.

Value in"agentDefinitionId""agentDeploymentId""agentReleaseId""model""provider"
agentDeploymentId?string

Only traces and model invocations of this agent deployment.

Match^[A-Za-z0-9._:-]+$
Length1 <= length <= 160

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Response Body

ObservabilityMetricSeriesResponse

application/json
  1. response
from*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
groupBy?string
Value in"agentDefinitionId""agentDeploymentId""agentReleaseId""model""provider"
interval*string
Value in"hour""day"
items*array<|>
source*string
Value in"model-invocations""traces"
to*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
curl -X GET "https://example.com/v1/observability/metrics" \  -H "x-deployments-organization: string"
{  "from": "2019-08-24T14:15:22Z",  "groupBy": "agentDefinitionId",  "interval": "hour",  "items": [    {      "bucket": "2019-08-24T14:15:22Z",      "error_count": 0,      "group_value": "string",      "p50_duration_ms": 0,      "p95_duration_ms": 0,      "total_cost_usd_micros": 0,      "total_tokens": 0,      "trace_count": 0    }  ],  "source": "model-invocations",  "to": "2019-08-24T14:15:22Z"}