Skip to content

Adds a metric definition to a product.

POST
/api/v1/provision/admin/products/{productId}/metrics
curl --request POST \
--url https://example.com/api/v1/provision/admin/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics \
--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.

Metric payload.

Admin request to define a metric on a product.

object
metricName
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
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