Skip to content

List metric definitions

GET
/v1/metric-alerts/definitions
curl --request GET \
--url 'https://shareout.site/v1/metric-alerts/definitions?artifact_id=example' \
--header 'Authorization: Bearer <token>'
artifact_id
required
string

Metric definitions

Media type application/json
object
metrics
Array<object>
object
artifact_id
required
string
metric_id
required

Stable key referenced by rules. Letters, digits, _, -.

string
label
required
string
format

Display hint: currency:USD, number, percent.

string
source
required

Where a metric value is read from.

object
type
required
string
Allowed values: json_path table_count table_aggregate
key

Json_path: the sdk.json key to read.

string
path

Json_path: e.g. $.revenue, $.totals.mrr.

string
table
string
field
string
fn
string
Allowed values: sum avg min max
where

Filter using the same operators as sdk.table().query().

object
Example
{
"metrics": [
{
"source": {
"type": "json_path",
"fn": "sum"
}
}
]
}