Updates a metric definition on a product; only the fields set on the body are changed.
const url = 'https://example.com/api/v1/provision/admin/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metrics/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"metricName":"example","name":"example","description":"example","metricType":"CumulativeCounter","unit":"example","category":"example","numberFormat":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Product id.
Metric id.
Request Bodyrequired
Section titled “Request Bodyrequired”Patch payload — unset/null properties are left unchanged.
Admin update payload for a product metric; null properties leave the existing value unchanged.
Admin update payload for a product metric; null properties leave the existing value unchanged.
Admin update payload for a product metric; null properties leave the existing value unchanged.
Responses
Section titled “Responses”OK
A lightweight metric definition on a product: the machine name clients report usage under, plus display metadata (name, unit, category, number format).
object
Machine identifier clients report usage under (as opposed to the display string ProductMetricDto.Name).
How reported usage values are interpreted and aggregated by the monitoring pipeline.
Display format hint, e.g. "0" or "0.0".
A lightweight metric definition on a product: the machine name clients report usage under, plus display metadata (name, unit, category, number format).
object
Machine identifier clients report usage under (as opposed to the display string ProductMetricDto.Name).
How reported usage values are interpreted and aggregated by the monitoring pipeline.
Display format hint, e.g. "0" or "0.0".
Example
{ "metricType": "CumulativeCounter"}A lightweight metric definition on a product: the machine name clients report usage under, plus display metadata (name, unit, category, number format).
object
Machine identifier clients report usage under (as opposed to the display string ProductMetricDto.Name).
How reported usage values are interpreted and aggregated by the monitoring pipeline.
Display format hint, e.g. "0" or "0.0".
Example
{ "metricType": "CumulativeCounter"}Bad Request
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}