Get metric definition with advanced properties

GET {{baseUrl}}/api/model/metrics/:metricId?showExpressionAs=tree&showFilterTokens=true&showAdvancedProperties=true

Request Params

KeyDatatypeRequiredDescription
showExpressionAsstringThis parameter specifies the format in which the expressions are returned in response.

This parameter applies to the expressions in a fact or attribute and custom expressions used in a filter, prompt, security filter, custom group, etc.

Expressions are presented in the following formats:

"text": A human readable, but non-parsable text, describing the expression. This is the default format that is always returned in the response.

"tree": A tree data structure fully defining the expression. This format can be used if you want to examine and modify the expression programmatically.

"tokens": A list of parsed tokens. This format can be used if you want to examine and modify the expression using the parser component. Note that generating tokens requires additional time.

Tokens are a semi-structured representation of MicroStrategy expression text that includes object references. For example, let’s say a filter expression is "Revenue > Cost". When the filter expression is represented as tokens, the text is broken down into pieces (tokens) with information about what these pieces represent in the metadata: ("Revenue", Revenue_ID), (">", GreaterThan_ID), ("Cost", Cost_ID).

If omitted, the expression is returned in "text" format.

If tree, the expression is returned in "text" and "tree" formats.

If tokens, the expression is returned in "text" and "tokens" formats.

Available values : tokens, tree | | showFilterTokens | boolean | | Specify whether the "condition" in threshold is returned in "tokens" format, along with "text" and "tree" formats.

The "condition" in threshold is presented in the following formats:

"text": A human readable, but non-parsable text, describing a condition's qualification. "tree": A tree data structure fully defining the condition's qualification. "tokens": A list of parsed tokens that define a condition's qualification. Be aware that generating tokens requires additional time. If omitted or false, only "text" and "tree" formats are returned.

If true, all "text", "tree" and "tokens" formats are returned. | | showAdvancedProperties | boolean | | Specify whether the metric’s definition is returned with advanced properties. If omitted or false, the advanced properties are not returned. If true, the advanced properties are are returned. |

HEADERS

KeyDatatypeRequiredDescription
X-MSTR-AuthTokenstring(Required)
X-MSTR-ProjectIDstring(Project ID or Changeset ID Required)
X-MSTR-MS-Changesetstring(Project ID or Changeset ID Required)