List custom metrics

Returns a page of the customer's custom metrics. Preset metrics are
not included. Requires the analytics:calculatedMetrics entitlement
and a metrics read permission.

rowCount is the exact number of metrics that match nameContains
and filter, across all pages. The page token is opaque and bound
to nameContains, filter, sortBy and sortOrder: reusing it
with different values gets 400 pagination_token_invalid.

Errors (RFC 9457 Problem Details, code field):

  • 400 validation_failed: a bad parameter, such as maxResults
    over 500 or an unknown sortBy value.
  • 400 filter_key_not_supported: a filter key other than name
    or owner. The details entry lists the supported keys in
    supportedKeys.
  • 400 pagination_token_invalid: see above.
  • 400 tenant_id_required: a caller with access to more than one
    customer sent no X-Tenant-Id.
  • 403 analytics.feature_not_entitled: the customer does not have
    the calculated metrics entitlement.
  • 403 forbidden: no metrics read permission, or an X-Tenant-Id
    that the credential cannot access.

maxResults is at most 500. A larger value returns 400 validation_failed.

sortOrder defaults to desc.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
int64
Defaults to 50

The maximum number of results to return in a single page. Use the page tokens to iterate through the entire collection.

string

Page token, returned by a previous call, to request the next page of results

string

Case-insensitive substring match against the resource name. Combined with the "filter" parameter using AND semantics.

string

Filter as key:value pairs, | between keys. Keys, operand
types and operators:

  • name — string; operator eq. Exact, case-sensitive match.
    Comma-separated values for OR.
  • owner — owner email; operator eq. Exact match.
    Comma-separated values for OR.

Any other key returns 400 filter_key_not_supported. For
example owner:finops%40example.com. Use nameContains for a
substring match on the name. Percent-encode
,, |, : and spaces inside values.

string
enum
Defaults to update_time

Field to sort by. Ties break by id, so paging never repeats or skips a metric.

Allowed:
string
enum

Specifies the sort direction; accepts asc for ascending (lowest to highest) or desc for descending (highest to lowest).

Allowed:
Headers
string

Customer (tenant) ID for the request. This is separate from authentication: you still pass your personal or service account API token in the Authorization header (Bearer <token>). See Get Started.

When to omit (most callers): If your personal or service account token belongs to a single customer, omit this header. The API resolves that customer from the token.

When to send: If your credential can access more than one customer, set X-Tenant-Id to the customer ID you want to act on. A service account can select an active direct or nested descendant of its home customer; the endpoint's normal permissions, entitlements, and resource-ownership checks still apply. A service-account target outside that customer subtree returns 403 Forbidden. Prefer this header over the legacy customerContext query parameter, which only applies to legacy API keys and is ignored by personal and service account tokens.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json