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

Search Metrics

Description

You can start a search to get a sortable, filterable and paginated list of metrics in an organization

Request

Request

URL

URL


post
https://console.cloud.vmware.com/commerce/cost-and-usage/api/{org_id}/metrics/search
Copy

Path Parameters

Path Parameters

string
org_id Required

Unique identifier (GUID) of the organization


Query Parameters

Query Parameters

array of string
filter Optional

Filtering criteria for the paginated request in the format: “property,eq(:value)”. For multiple filter criteria: “filter=property1,eq(:value)&filter=property2,eq(:value)”. Supported filtering properties are “metric_id, service_definition_id, seller_id, usage_date_time, commit_quantity, usage_quantity, overage_quantity, status. A property may be specified multiple times to match against multiple values”

Parameter Serialization Style: form Explode:true

string
locale Optional

Locale with language preference (e.g. en_US)


integer
page Optional

The index of requested page (0-based). Default = 0

Parameter Serialization Style: form Explode:true

integer
size Optional

Size of each page. Default = 20

Parameter Serialization Style: form Explode:true

array of string
sort Optional

Sorting criteria for the paginated request in the format: “property(,asc|desc)”. For multiple sort criteria: “sort=property1(,asc|desc)&sort=property2(,asc|desc)”. Supported sorting properties are “metric_id, service_definition_id, seller_id, usage_date_time, commit_quantity, usage_quantity, overage_quantity, status”. Default is “metric_id,asc”

Parameter Serialization Style: form Explode:true

Request Body

Request Body

MetricsSearchBody of mimetype application/json Optional

JSON object containing filter criteria as charge attributes

{
    "charge_attributes": {
        "aws_region": "EU_WEST_3",
        "category": "HOST_USAGE"
    }
}
map
charge_attributes Optional

Charge Attributes of a Metric

Response

Response

Response Body

Response Body

200 OK

Returns MetricsSearchResponse of type application/json
{
	"content": [
		{
			"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
			}
		}
	],
	"empty": false,
	"first": false,
	"last": false,
	"number": 0,
	"number_of_elements": 0,
	"pageable": {
		"offset": 0,
		"page_number": 0,
		"page_size": 0,
		"paged": false,
		"sort": {
			"empty": false,
			"sorted": false,
			"unsorted": false
		},
		"unpaged": false
	},
	"size": 0,
	"sort": {
		"empty": false,
		"sorted": false,
		"unsorted": false
	},
	"total_elements": 0,
	"total_pages": 0
}
array of MetricUsage
content Optional

Usage information for the attached metric


boolean
empty Optional

Whether there is no item to be returned


boolean
first Optional

Whether user request the first page


boolean
last Optional

Whether user request the last page


integer as int32
number Optional

Number of requested page (0-based)


integer as int32
number_of_elements Optional

The number of MetricUsage items as the result of filter/sort/pagination operations. If there are no such operations, it will be equal to total_elements.


pageable Optional

Pagination information given by user


integer as int32
size Optional

Size of each page


sort Optional

Sort information given by user


integer as int64
total_elements Optional

Total number of results


integer as int32
total_pages Optional

Total number of pages

Errors

Errors

ApiError
400

Bad Request


401

Unauthorized


403

Forbidden

Code Samples

Code Samples

cURL Command

curl -X POST -H "Content-Type: application/json" -d '{"charge_attributes":{"aws_region":"EU_WEST_3","category":"HOST_USAGE"}}' https://console.cloud.vmware.com/commerce/cost-and-usage/api/{org_id}/metrics/search


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

Was this page helpful?