Create a new custom group
POST {{baseUrl}}/api/model/customGroups
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
showExpressionAs | null | This 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 |
Request Body
{"information"=>{"subType"=>"custom_group", "name"=>"Age Groups", "description"=>"Custom group defined with attribute qualification on Customer Age.", "destinationFolderId"=>"{{publicReportsFolderId}}"}, "options"=>{"hierarchyDisplay"=>true, "subtotalsDisplay"=>false, "elementHeaderAboveChild"=>true}, "elements"=>[{"name"=>"< 25", "displayOption"=>"element", "qualification"=>{"text"=>"({Customer Age} (ID) < 25)", "tree"=>{"type"=>"predicate_form_qualification", "predicateText"=>"({Customer Age} (ID) < 25)", "predicateTree"=>{"function"=>"less", "parameters"=>[{"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"25.0"}}], "attribute"=>{"objectId"=>"6E069E4C11D3E4E41000E887EC6DE8A4", "subType"=>"attribute", "name"=>"Customer Age"}, "form"=>{"objectId"=>"45C11FA478E745FEA08D781CEA190FE5", "subType"=>"attribute_form_system", "name"=>"ID"}}}}}, {"name"=>"25-35", "displayOption"=>"element", "qualification"=>{"text"=>"({Customer Age} (ID) Between 25 and 35)", "tree"=>{"type"=>"predicate_form_qualification", "predicateText"=>"({Customer Age} (ID) Between 25 and 35)", "predicateTree"=>{"function"=>"between", "parameters"=>[{"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"25.0"}}, {"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"35.0"}}], "attribute"=>{"objectId"=>"6E069E4C11D3E4E41000E887EC6DE8A4", "subType"=>"attribute", "name"=>"Customer Age"}, "form"=>{"objectId"=>"45C11FA478E745FEA08D781CEA190FE5", "subType"=>"attribute_form_system", "name"=>"ID"}}}}}, {"name"=>"36-50", "displayOption"=>"element", "qualification"=>{"text"=>"({Customer Age} (ID) Between 36 and 50)", "tree"=>{"type"=>"predicate_form_qualification", "predicateText"=>"({Customer Age} (ID) Between 36 and 50)", "predicateTree"=>{"function"=>"between", "parameters"=>[{"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"36.0"}}, {"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"50.0"}}], "attribute"=>{"objectId"=>"6E069E4C11D3E4E41000E887EC6DE8A4", "subType"=>"attribute", "name"=>"Customer Age"}, "form"=>{"objectId"=>"45C11FA478E745FEA08D781CEA190FE5", "subType"=>"attribute_form_system", "name"=>"ID"}}}}}, {"name"=>"51-60", "displayOption"=>"element", "qualification"=>{"text"=>"({Customer Age} (ID) Between 51 and 60)", "tree"=>{"type"=>"predicate_form_qualification", "predicateText"=>"({Customer Age} (ID) Between 51 and 60)", "predicateTree"=>{"function"=>"between", "parameters"=>[{"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"51.0"}}, {"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"60.0"}}], "attribute"=>{"objectId"=>"6E069E4C11D3E4E41000E887EC6DE8A4", "subType"=>"attribute", "name"=>"Customer Age"}, "form"=>{"objectId"=>"45C11FA478E745FEA08D781CEA190FE5", "subType"=>"attribute_form_system", "name"=>"ID"}}}}}, {"name"=>"> 60", "displayOption"=>"element", "qualification"=>{"text"=>"({Customer Age} (ID) > 60)", "tree"=>{"type"=>"predicate_form_qualification", "predicateText"=>"({Customer Age} (ID) > 60)", "predicateTree"=>{"function"=>"greater", "parameters"=>[{"parameterType"=>"constant", "constant"=>{"type"=>"double", "value"=>"60.0"}}], "attribute"=>{"objectId"=>"6E069E4C11D3E4E41000E887EC6DE8A4", "subType"=>"attribute", "name"=>"Customer Age"}, "form"=>{"objectId"=>"45C11FA478E745FEA08D781CEA190FE5", "subType"=>"attribute_form_system", "name"=>"ID"}}}}}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-MSTR-AuthToken | string | (Required) Authorization Token | |
X-MSTR-MS-Changeset | string | (Required) Changeset ID |