Logo
MicroStrategy REST API API Documentation

Update a specific datamart definition through Modeling service

PUT {{baseUrl}}/api/model/datamarts/:datamartId

 

Body PARAM

Key Datatype Required Description 
showExpressionAs
string 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.
showFilterTokens
boolean Specify whether the "condition" in filter 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 to retrieve the values of the advanced properties. The advanced properties are presented in the following groups: "vldbProperties": A list of properties as determined by the common infrastructure. "metricJoinTypes": A list of Metric Join Types, one for each metric that appears in the template. "attributeJoinTypes": A list of Attribute Join Types, one for each attribute that appears in the template. If omitted or false, nothing will be returned for the advanced properties. If true, all applicable advanced properties are returned.



HEADERS

Key Datatype Required Description 
X-MSTR-AuthToken
string (Required) Authorization token
Curl
curl -X PUT 'baseUrl/api/model/datamarts/:datamartId?showExpressionAs=tokens&showFilterTokens=true&showAdvancedProperties=true' -H 'X-MSTR-AuthToken: authToken' -H 'X-MSTR-ProjectID: projectId' -d '{"information":{"description":"modified by datamart public API"},"dataSource":{"dataTemplate":{"units":[{"id":"8D679D3811D3E4981000E787EC6DE8A4","name":"Country","type":"attribute"},{"id":"8D679D3611D3E4981000E787EC6DE8A4","name":"Catalog","type":"attribute"},{"id":"8D679D3511D3E4981000E787EC6DE8A4","name":"Call Center","type":"attribute"},{"id":"8D679D5211D3E4981000E787EC6DE8A4","name":"Distribution Center","type":"attribute"},{"id":"8D679D4F11D3E4981000E787EC6DE8A4","name":"Subcategory","type":"attribute"},{"type":"metrics","elements":[{"id":"7FD5B69611D5AC76C000D98A4CC5F24F","name":"Cost","subType":"metric"}]}]}},"datamartOptions":{"append":true,"targetSource":{"objectId":"A23BBC514D336D5B4FCE919FE19661A3","subType":"db_role","name":"Tutorial Warehouse"},"tableName":"dm_sample_new","placeholderIncluded":true,"datamartProperties":{"DatamartProperties":{".":{"Create Table Post String":{"name":"Create Table Post String","value":"","type":"string","resolvedLocation":"object"},"Insert SQLs":{"name":"Insert SQLs","value":"","type":"string","resolvedLocation":"object"},"Maximum Execution Time":{"name":"Maximum Execution Time","value":"0","type":"int32","resolvedLocation":"object"},"Maximum Rows":{"name":"Maximum Rows","value":"65536","type":"int32","resolvedLocation":"object"},"Post SQLs":{"name":"Post SQLs","value":"","type":"string","resolvedLocation":"object"},"Pre SQLs":{"name":"Pre SQLs","value":"","type":"string","resolvedLocation":"object"},"Table Descriptor":{"name":"Table Descriptor","value":"","type":"string","resolvedLocation":"object"},"Table Option":{"name":"Table Option","value":"","type":"string","resolvedLocation":"object"},"Table Prefix":{"name":"Table Prefix","value":"","type":"string","resolvedLocation":"object"},"Table Qualifier":{"name":"Table Qualifier","value":"","type":"string","resolvedLocation":"object"},"Table Space":{"name":"Table Space","value":"","type":"string","resolvedLocation":"object"},"Table Type":{"name":"Table Type","value":"0","type":"int32","resolvedLocation":"object"}}}}},"timezone":{"objectId":"1A031D059E6D47199DF3D7FF4FFBE760","subType":"timezone_custom","name":"Custom TZ1"}}'

ENDPOINTS