Skip to content

Updates a metric definition on a product; only the fields set on the body are changed.

PATCH
/api/v1/provision/admin/products/{productId}/metrics/{metricId}
curl --request PATCH \
--url https://example.com/api/v1/provision/admin/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--data '{ "metricName": "example", "name": "example", "description": "example", "metricType": "CumulativeCounter", "unit": "example", "category": "example", "numberFormat": "example" }'
productId
required
string format: uuid

Product id.

metricId
required
string format: uuid

Metric id.

Patch payload — unset/null properties are left unchanged.

Admin update payload for a product metric; null properties leave the existing value unchanged.

object
metricName
null | string
name
null | string
description
null | string
metricType
One of:
null
unit
null | string
category
null | string
numberFormat
null | string

OK

A lightweight metric definition on a product: the machine name clients report usage under, plus display metadata (name, unit, category, number format).

object
id
string format: uuid
productId
string format: uuid
metricName

Machine identifier clients report usage under (as opposed to the display string ProductMetricDto.Name).

string
name
string
description
null | string
metricType

How reported usage values are interpreted and aggregated by the monitoring pipeline.

Allowed values: CumulativeCounter TotalCounter Gauge UpDownCounter
unit
string
category
string
numberFormat

Display format hint, e.g. "0" or "0.0".

string

Bad Request

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string

Not Found

object
type
null | string
title
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
detail
null | string
instance
null | string