Get a custom metric

Returns one custom metric, with its etag in the body and in the
strong ETag header. Requires the analytics:calculatedMetrics
entitlement and a metrics read permission.

Errors (RFC 9457 Problem Details, code field):

  • 400 validation_failed: id has the wrong format.
  • 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.
  • 404 not_found: no custom metric with this id for the customer.
    A preset metric id also gets 404.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
^[A-Za-z0-9_-]{1,128}$

Identifier of the custom metric, as returned in id.

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