Skip to main content

Manage metric objects

Available since 2021 Update 5


You can try these workflows with REST API Playground.

Learn more about MicroStrategy REST API Playground here.

You can use REST API requests to retrieve, create, and update metric objects through the Modeling service:


Training metrics, extreme metric, reference line metrics, and relationship metrics are not allowed to be retrieved, created, or updated through the metric REST API.

The following table lists important fields in the API response body defined for a metric:

informationStores the basic subtotal information including dateCreated, dateModified, versionId, primaryLocale, objectId, subType, and name. For a metric, subType is metric.
expressionStores the aggregation types and targets defined in the metric either using single-value functions or group-value functions.

Tokens are a semi-structured representation of a MicroStrategy expression text that includes object references. When the metric’s expression is represented as tokens, the text is broken down into pieces, or tokens, with information about what these pieces represent in the metadata.

A metric's “expression" is presented in the following formats:

"text": A human-readable, but non-parsable text, that describes a metric's expression.

"tree": A tree data structure that fully defines the metric's expression.

"tokens": A list of parsed tokens that define a metric's expression. Generating tokens requires additional time.

If showExpressionAs is omitted, only "text" formats are returned.

If showExpressionAs is tree, "text" and "tree" formats are returned.

If showExpressionAs is tokens, "text" and "tokens" formats are returned.
dimtyContains a list of DimtyUnit, which describes the level metrics can be calculated.
conditionalityContains a filter that needs to apply to the metric.
metricSubtotalsContains a vector that needs to apply to the metric.
aggregateFromBaseContains a vector of subtotals to apply to the metric.
formulaJoinTypeIndicates the formula join type for the metric.
dataTypeIndicates the data type for the metric.
smartTotalIndicates the total calculation type.
formatContains the header format and value format.
subtotalFromBaseIndicates the subtotal type for the metric.
columnNameAliasContains the name used in SQL generation.
metricFormatTypeIndicates the format type for the metric.
thresholdsContains a list of thresholds applied to the metric.

For more information about the Modeling service, see Configuring the Modeling Service.