Aerovy Platform logo

Update a metric definition

PUThttps://spectra.api.aerovy.com/v2/definitions/metrics/{metricId}

Updates the mutable fields of a metric definition. Requires an API key with the write action scoped to the metric. Name, data type, and default aggregation are immutable.

Loading code example
Loading code example

Authorizations

apiKeystringheaderrequired

API key passed in the header.

Path Parameters

metricIdstringrequired

The metric id.

Body

The fields to update; omitted fields are left unchanged.

displayNamenull | string

New display name, if changing.

descriptionnull | string

New description, if changing.

unitLabelnull | string

New unit label, if changing.

tagsnull | array

New tag set, if changing (fully replaces the existing tags).

enumValuesnull | array

When provided, fully replaces the metric's enum value set — any omitted enum value definitions are deleted.

Response

application/json

The updated metric definition.

metricIdstring

Stable identifier for the metric.

namestring

Programmatic name of the metric.

displayNamestring

Human-readable name of the metric.

descriptionstring

Description of what the metric measures.

unitLabelstring

Unit label for the metric's values.

dataTypestring

The metric's data type.

defaultAggregationstring

Default aggregation used when binning this metric.

tagsarray<string>

Free-form tags applied to the metric.

enumValuesnull | array

Allowed enumerated values, when the metric is enum-typed.

isDeletedboolean

Whether the metric has been soft-deleted.

createdAtstring<date-time>

Timestamp (UTC) when the metric was created.

updatedAtnull | string<date-time>

Timestamp (UTC) when the metric was last updated.

createdBystring

Identifier of the actor that created the metric.

updatedBynull | string

Identifier of the actor that last updated the metric.