Skip to main content
Retrieve a custom metric by its source and name

Authorizations

Authorization
string
header
required

HTTP Basic authentication using global administrator credentials (username and password).

Path Parameters

sourceId
string
required
name
string
required

Response

The custom metric was retrieved successfully

Custom metric representation

expression
string
required

Expression that defines the custom metric

Example:

"SUM(sales_in_usd) + SUM(sales_in_uah) * uah_to_usd_exchange_rate"

name
string

Unique identifier of the custom metric within the source across all custom metrics and fields. It's immutable and may be specified in create request only

Maximum string length: 255
Example:

"sum_of_sales"

label
string

User visible representation of the custom metric.

Maximum string length: 255
Example:

"Sum of Sales"

visible
boolean

Whether the custom metric should be visible to users on a visual

numberFormat
object

Number format of the custom metric value display

timeFormat
object

Time format of the custom metric value display

granularity
enum<string>
deprecated

The minimum time granularity of this field.

Available options:
MILLISECOND,
SECOND,
MINUTE,
HOUR,
DAY,
WEEK,
MONTH,
QUARTER,
YEAR
dataType
enum<string>

Data type of the custom metric. It’s detected automatically based on the metric expression

Available options:
ATTRIBUTE,
NUMBER,
INTEGER,
TIME,
TEXT,
HIERARCHY,
NULL