Limited Release
Metric management helps you monitor, update, and delete existing metrics. You can retrieve metric configurations and modify metric settings to track different usage patterns and adjust billing calculations as your business requirements change.
List metrics
Use a valid access token and make a GET call to the/v1/commerce/billing/metrics endpoint. Include the following query parameters:
| Parameter | Action |
|---|---|
pageinteger | Set the page number for paginated results. Default is 1. |
per_pageinteger | Set the number of items to return per page. Default is 10, maximum is 100. |
200 OK response with a paginated list of all configured metrics.
Update metric details
Use a valid access token and make a PUT call to the/v1/commerce/billing/metrics/{metric_code} endpoint with the modified request parameters such as name, description, aggregation type, aggregation field, and field filters.
Path parameter: metric_code is the code you provided when you created the metric.
You cannot modify the metric code or type after creation. You can only update the name, description, aggregation type, aggregation field, and field filters.
200 OK response with the updated metric information.
Delete metric
Use a valid access token and make a DELETE call to the/v1/commerce/billing/metrics/{metric_code} endpoint to permanently delete a metric.
Path parameter: metric_code is the code you provided when you created the metric.
204 No Content response.