[{"label":"Latest (1.0.0)","version":"latest"}]
cost-and-usage-management

Get Top Usages

Description

The API allows you to get the top N usage metrics with commitments in the last M days starting from their latest update times, sorted in descending order by the usage/commitment ratio. This allows you to quickly identify the usage metrics that are exceeding their commitments the most.

Request

Request

URL

URL


get
https://console.cloud.vmware.com/commerce/cost-and-usage/api/{org_id}/usage/top-items
Copy

Path Parameters

Path Parameters

string
org_id Required

Unique identifier (GUID) of the organization


Query Parameters

Query Parameters

integer
count Optional

Requested number of usage metrics. Default = 5

Parameter Serialization Style: form

integer
date_range Optional

Requested number of days to specify the time range for usages. Default = 30

Parameter Serialization Style: form

string
locale Optional

Locale with language preference (e.g. en_US)


Response

Response

Response Body

Response Body

200 OK

Returns array of MetricUsage of type application/json
{
	"metadata": {
		"charge_attributes": {
			"key": "string"
		},
		"display_name": "string",
		"metric_id": "string",
		"service_definition_id": "string",
		"unit_of_measure_display_name": "string"
	},
	"usage": {
		"commitment": 0,
		"last_updated": "string",
		"overage": 0,
		"partner_id": "string",
		"seller": "string",
		"seller_id": "string",
		"status": "OVER_COMMITMENT",
		"subscriptions": [
			{
				"billing_engine_subscription_id": "string",
				"subscription_id": "string"
			}
		],
		"usage": 0
	}
}
metadata Required

The metadata for the metric


usage Required

Information about the usage

Errors

Errors

ApiError
400

Bad Request


401

Unauthorized


403

Forbidden

Code Samples

Code Samples

cURL Command

curl https://console.cloud.vmware.com/commerce/cost-and-usage/api/{org_id}/usage/top-items


[{"label":"Latest (1.0.0)","version":"latest"}]
cost-and-usage-management
Feedback

Was this page helpful?