API: Metrics
Governed metrics: definitions, values, and series. All endpoints require authentication unless noted. 10 endpoints.
GET /api/metrics
Section titled “GET /api/metrics”List governed metrics
Responses: 200 · 400 · 401
POST /api/metrics
Section titled “POST /api/metrics”Create a governed metric
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
description |
string | no | |
modelId |
string | no | |
savedQueryId |
string | no | |
ownerId |
string | no | |
expression |
string | yes | |
timeDimension |
string | no | |
grain |
"day" | "week" | "month" | "quarter" | "year" |
no | |
filters |
array of — | no | |
target |
number | no | |
thresholds |
object | no | |
format |
object | no |
Responses: 201 · 400 · 401 · 409
GET /api/metrics/{id}
Section titled “GET /api/metrics/{id}”Get a governed metric
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Responses: 200 · 400 · 401 · 404
PUT /api/metrics/{id}
Section titled “PUT /api/metrics/{id}”Update a governed metric
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | no | |
description |
string | no | |
modelId |
string | no | |
savedQueryId |
string | no | |
ownerId |
string | no | |
expression |
string | no | |
timeDimension |
string | no | |
grain |
"day" | "week" | "month" | "quarter" | "year" |
no | |
filters |
array of — | no | |
target |
number | no | |
thresholds |
object | no | |
format |
object | no |
Responses: 200 · 400 · 401 · 404
DELETE /api/metrics/{id}
Section titled “DELETE /api/metrics/{id}”Delete a governed metric
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Responses: 204 — No content · 401 · 404
POST /api/metrics/{id}/value
Section titled “POST /api/metrics/{id}/value”Evaluate a governed metric’s current value (and optional series)
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
filters |
array of object | no | |
refresh |
boolean | no | |
series |
object | no |
Responses: 200 · 400 · 401 · 404
GET /api/metrics/digests
Section titled “GET /api/metrics/digests”List metric digests
Responses: 200 · 400 · 401
POST /api/metrics/digests
Section titled “POST /api/metrics/digests”Create a metric digest
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
name |
string | yes | |
metricIds |
array of string | yes | |
schedule |
"daily" | "weekly" |
no | |
isEnabled |
boolean | no |
Responses: 201 · 400 · 401 · 409
DELETE /api/metrics/digests/{id}
Section titled “DELETE /api/metrics/digests/{id}”Delete a metric digest
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Responses: 204 — No content · 401 · 404
POST /api/metrics/digests/{id}/send
Section titled “POST /api/metrics/digests/{id}/send”Evaluate and deliver a digest now
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id |
string | yes |
Responses: 200 · 400 · 401 · 404