Skip to content

Preview metric expression

POST
/api/v1/livedoc/query/preview-metric
curl --request POST \
--url https://app.avera.io/api/v1/livedoc/query/preview-metric \
--header 'Content-Type: application/json' \
--data '{ "expression": "example", "format": { "type": "example", "pattern": "example", "prefix": "example", "suffix": "example" } }'

Test a metric expression

Media typeapplication/json
object
expression
required
string
format
One of:
object
type
required
string
pattern
string | null
prefix
string | null
suffix
string | null

Example generated

{
"expression": "example",
"format": {
"type": "example",
"pattern": "example",
"prefix": "example",
"suffix": "example"
}
}

OK

Media type*/*
object
value
null
formattedValue
required
string
error
string | null
executionTimeMs
required
integer format: int64