Update property value with null (set value to default)
PUT {{baseUrl}}/api/model/datasources/:datasourceId?showAdvancedProperties=true
Updates a specific attribute in the changeset. This request replaces the attribute's top-level fields with the new definition provided in the request body.
In the request body, forms
contains the detailed definition of a list of attribute forms. Each attribute contains one or more attribute forms.
Each attribute form contains:
* expressions
: A list of attribute form expressions. Attribute form contains one or more attribute form expressions. Each attribute form expression contains expression
and tables
.
* ”expression”: Needs to be in either tree
or tokens
format.
* Tokens are a semi-structured representation of MicroStrategy expression text that includes object references. For example, let’s say an attribute form expression is Year - 10
. When the attribute form expression is represented as tokens, the text is broken down into pieces (tokens) with information about what these pieces represent in the metadata: (Year_ID
, YearcolumnID), (-
, Minus_ID), (10
, Constant).
* tables
: A list of tables that the expression
applies to.
* dataType
and alias
are optional. If omitted, they are calculated based on the first attribute form expression.
* childForms
is specific to a form group, which contains the reference for child forms
Provide a lookup table on either the attribute level or attribute form level, as it is required for the object to be committed to the metadata. A lookup table can be defined on the attribute level using attributeLookupTable
, or the attribute form level using lookupTable
. If LookupTable
is defined at the attribute form level, it is used, or it falls back to attributeLookupTable
.
Provide keyForm
and displays
, as they are required for the object to be committed to the metadata.
The changeset ID can be obtained using the changeset creation API. An authorization token is required to execute the request and can be obtained using Authentication endpoints.
To save the newly updated attribute to the metadata, commit using the changeset commit API.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
showAdvancedProperties | boolean |
Request Body
{"advancedProperties"=>{"vldbProperties"=>{"DatamartProperties"=>{"."=>{"Insert SQLs"=>{"value"=>nil}}}}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-MSTR-AuthToken | string | (Required) Authorization Token | |
X-MSTR-MS-Changeset | string | (Required) Changeset ID | |
Content-Type | string |