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.
- Retrieve a Metric's Definition
- Retrieve a Metric's Definition within a Changeset
- Create a Metric within a Changset
- Update a Metric's Definition within a Changeset
- Retrieve a Metric's applicable properties
The following table lists important fields in the API response body defined for a metric:
|information||Stores the basic subtotal information including |
|expression||Stores 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.
|dimty||Contains a list of |
|conditionality||Contains a filter that needs to apply to the metric.|
|metricSubtotals||Contains a vector that needs to apply to the metric.|
|aggregateFromBase||Contains a vector of subtotals to apply to the metric.|
|formulaJoinType||Indicates the formula join type for the metric.|
|dataType||Indicates the data type for the metric.|
|smartTotal||Indicates the total calculation type.|
|format||Contains the header format and value format.|
|subtotalFromBase||Indicates the subtotal type for the metric.|
|columnNameAlias||Contains the name used in SQL generation.|
|metricFormatType||Indicates the format type for the metric.|
|thresholds||Contains a list of thresholds applied to the metric.|
For more information about the Modeling service, see Configuring the Modeling Service.