POST /v1/metrics
Create a Metric
Create a governed business metric or key performance indicator
POST
POST /v1/metrics
Create a Metric
Create a metric with its business definition, calculation expression, unit, granularity, and governance relationships.Body Parameters
string
required
Globally unique name of the metric.
string
Human-readable display name for the metric.
string
Description of what the metric measures and how it should be used, in Markdown format.
object
Expression used to calculate the metric.
string
Metric type:
COUNT, SUM, AVERAGE, RATIO, PERCENTAGE, MIN, MAX, MEDIAN, MODE, STANDARD_DEVIATION, VARIANCE, SIMPLE, CUMULATIVE, DERIVED, CONVERSION, or OTHER.string
Unit:
COUNT, DOLLARS, PERCENTAGE, TIMESTAMP, SIZE, REQUESTS, EVENTS, TRANSACTIONS, or OTHER.string
Custom unit name when
unitOfMeasurement is OTHER.string
Time granularity:
SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR.array
Dimensions that can be used to group or slice the metric.
array
Measures used by the metric.
array
Filters applied when calculating the metric.
Fully qualified names of related metrics.
array
Entity references for data assets this metric is calculated from or applies to.
array
User or team references that own the metric.
array
User or team references responsible for reviewing the metric.
array
Classification tags to apply to the metric.
array
Fully qualified names of domains the metric belongs to.
array
Fully qualified names of data products that include the metric.
object
Custom property values defined by your organization’s metadata schema.
string
default:"user"
Entity provider:
system, user, or automation.POST /v1/metrics
Returns
Returns the created metric with system-generated fields such asid, fullyQualifiedName, version, and href.
Create or Update (PUT)
UsePUT /v1/metrics to upsert a metric. If a metric with the same name exists, OpenMetadata updates it; otherwise, it creates a new metric. The request body is the same as for POST.
Bulk Create or Update
UsePUT /v1/metrics/bulk with an array of create requests. Add ?async=true to process the request asynchronously.