Retrieve a MDPM table
GET {{baseUrl}}/api/model/tables/:tableId?showFilterTokens=false&showExpressionAs=tree
This API gets a detailed definition for a specified (logical) table.
The project ID is required to return a table's definition in metadata. The changeset ID is required to return a table's definition within a specific changeset. To execute the request, either the project ID or changeset ID needs to be provided. If both are provided, only the changeset ID is used.
A physical table describes the metadata of a warehouse table. It contains a set of columns with a schema definition. A logical table describes the higher-level data model objects (facts, attributes, etc.) that the architect wants to use to model the contents of the physical table. If the caller sets the fields parameter, then the response contains the specified fields information. For example, if the caller specifies the PhysicalTable field, the response contains a PhysicalTable field for each table. By default, only the information field is returned.
A 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.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
showFields | string | Specify what additional information is returned. | |
Only "acl" is supported. |
-
If
acl
, the access control list for each object is included. | |fields
| null | | A comma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. By default, all fields are returned. If specified, extra filtering is applied, and for the top-level object (if the root model is an array, each array element), only the listed fields are kept in the response. For example, "information,logicalSize" keeps only the "information" and "logicalSize" fields, omitting all other fields in the top-level response model. | |showFilterTokens
| boolean | | Specify whether "qualification" is returned in "tokens" format, along with "text" and "tree" formats. A filter's "qualification" is presented in the following formats: -
"text": A human readable, but non-parsable text, describing a filter's qualification.
-
"tree": A tree data structure fully defining the filter's qualification.
-
"tokens": A list of parsed tokens that define a filter's qualification. Be aware that generating tokens requires additional time. If omitted or
false
, only "text" and "tree" formats are returned. Iftrue
, all "text", "tree" and "tokens" formats are returned. | |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. Iftokens
, the expression is returned in "text" and "tokens" formats. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-MSTR-AuthToken | string | (Required) Authorization Token | |
X-MSTR-ProjectID | string | Project ID | |
X-MSTR-MS-Changeset | string | Changeset ID | |