Export Dimension / Attribute Hierarchy (Master and Analytic Models)
  • 5 Minutes to read
  • Dark
    Light
  • PDF

Export Dimension / Attribute Hierarchy (Master and Analytic Models)

  • Dark
    Light
  • PDF

Article summary

Export Dimension / Attribute Hierarchy (Master and Analytic Models)

This API allows you to export the entire dimension/attribute hierarchy from a specified model in XML or JSON format. Example requests and responses in JSON and XML formats are provided below with dimension and attribute examples.

  • Hierarchy member code

  • Hierarchy member parent

  • Hierarchy member rollup operator

  • Hierarchy member display label

  • Mapped attributes

  • Mapped dimensions

Note:
DAP (Direct Access to PCR) models and the HACPM_Financial model are not supported with this API. Additionally, the root member (top most member of the hierarchy) will not have a <Member-Parent> tag.
POST /api/modeling/model/dimension/export HTTP/1/1
Content-Type: application/json or application/xml
Accept: application/json or application/xml
X-ACCESS-TOKEN: $ACCESS_TOKEN_GUID$

Request Payload Examples

Request Payload JSON

{
	“model”: “$ModelName”,
	“dimension”: “$DimensionName/$AttributeName”,
	“includeAttributes”: true
	“includeDimensions”: true
}

Request Payload XML

<?xml version="1.0" encoding="UTF-8"?>
<payload>
<model>$ModelName</model>
<dimension>$DimensionName</dimension>
<include-attributes>$includeAttributes</include-attributes>
<include-dimensions>$includeDimensions</include-dimensions>
</payload>

Parameters

  1. $ModelName: (type: string) Name of the model. If the model specified does not exist, the operation is canceled.

  2. $DimensionName: (type: string) Name of the Dimension that is associated with this model. If the dimension specified does not exist, the operation is canceled.

  3. $AttributeName: (type: string) Name of the Attribute that is associated with this model. If the Attribute specified does not exist, the operation is canceled.

  4. $includeAttributes: (type: boolean) Include attribute mapping (if applicable).

  5. $inclueDimensions: (type: boolean) include dimension mapping (if applicable).

Payload Samples and Requests

Payload Sample JSON: Dimension Example

{
	“modelName”: “Financial Data”,
	“dimensionName”: “Account”,
	“includeAttributes”: true
}

Request

{
  "members": [
    {
      "memberCode": "Expense",
      "rollupOp": "-",
      "memberDisplayLabel": "Expense"
    },
    {
      "memberCode": "28 DYN Income",
      "memberParent": "Expense",
      "rollupOp": "+",
      "memberDisplayLabel": "28 DYN Income",
      "mapping": [
        {
          "attributeName": "colour",
          "attributeCode": "green"
        }
      ]
    },
    {
      "memberCode": "28 HYP A/C",
      "memberParent": "Expense",
      "rollupOp": "+",
      "memberDisplayLabel": "28 HYP A/C",
      "mapping": [
        {
          "attributeName": "colour",
          "attributeCode": "red"
        }
      ]
    },
    {
      "memberCode": "28 Expense",
      "memberParent": "Expense",
      "rollupOp": "+",
      "memberDisplayLabel": "28 Expense",
      "mapping": [
        {
          "attributeName": "colour",
          "attributeCode": "orange"
        }
      ]
    },
    {
      "memberCode": "ExtraAccountMem21",
      "memberParent": "Expense",
      "rollupOp": "+",
      "memberDisplayLabel": "ExtraAccountMem21"
    },
    {
      "memberCode": "ExtraAccountMem22",
      "memberParent": "Expense",
      "rollupOp": "+",
      "memberDisplayLabel": "ExtraAccountMem22",
      "mapping": [
        {
          "attributeName": "colour",
          "attributeCode": "blue"
        }
      ]
    }
  ]
}

Payload Sample JSON: Dimension leaf member disabled example

When the dimension leaf member is disabled, dimension members mapped to attribute members will not be exported.

{
  "modelName": "Financial Data",
  "dimensionName": "color",
  "includeDimensions":true
}

Response

{
    "members": [
        {
            "memberCode": "color",
            "rollupOperator": "~",
            "memberDisplayLabel": "color"
        },
        {
            "memberCode": "blue",
            "memberParent": "color",
            "rollupOperator": "+",
            "memberDisplayLabel": "blue",
            "mapping": [
                {
                    "dimension": "Account",
                    "dimensionCode": [
                        "Account22"
                    ]
                }
            ]
        },
        {
            "memberCode": "orange",
            "memberParent": "color",
            "rollupOperator": "+",
            "memberDisplayLabel": "orange",
            "mapping": [
                {
                    "dimension": "Account",
                    "dimensionCode": [
                        "28 Expense"
                    ]
                }
            ]
        },
        {
            "memberCode": "red",
            "memberParent": "color",
            "rollupOperator": "+",
            "memberDisplayLabel": "red",
            "mapping": [
                {
                    "dimension": "Account",
                    "dimensionCode": [
                        "28 HYP A/C"
                    ]
                }
            ]
        },
        {
            "memberCode": "green",
            "memberParent": "color",
            "rollupOperator": "+",
            "memberDisplayLabel": "green",
            "mapping": [
                {
                    "dimension": "Account",
                    "dimensionCode": [
                        "28 DYN Income"
                    ]
                }
            ]
        },
        {
            "memberCode": "_Attribute_Default",
            "memberParent": "color",
            "rollupOperator": "+",
            "memberDisplayLabel": "_Attribute_Default",
            "mapping": [
                {
                    "dimension": "Account",
                    "dimensionCode": [
                        "Account21"
                    ]
                }
            ]
        }
    ]
}

Payload Sample JSON: Dimension leaf member enabled example

When the dimension leaf member is enabled, dimension members mapped to attribute members will be exported.

{
  "modelName": "Financial Data",
  "dimensionName": "Enterprise",
  "includeDimensions":true
}

Response

{
    "members": [
        {
            "memberCode": "908",
            "memberParent": "_Attribute_Default",
            "rollupOperator": "+",
            "memberDisplayLabel": "908 - Elim - Hot - Nev Corp"
        },
        {
            "memberCode": "909",
            "memberParent": "_Attribute_Default",
            "rollupOperator": "+",
            "memberDisplayLabel": "909 - Elim - Hot - Nev Inc"
        },
        {
            "memberCode": "2020 AFN",
            "memberParent": "_Attribute_Default",
            "rollupOperator": "+",
            "memberDisplayLabel": "2020 AFN"
        },
        {
            "memberCode": "Enterprise",
            "rollupOperator": "~",
            "memberDisplayLabel": "Enterprise"
        },
        {
            "memberCode": "Sales",
            "memberParent": "Enterprise",
            "rollupOperator": "+",
            "memberDisplayLabel": "Sales"
        },
        {
            "memberCode": "Finance",
            "memberParent": "Enterprise",
            "rollupOperator": "+",
            "memberDisplayLabel": "Finance"
        },
        {
            "memberCode": "_Attribute_Default",
            "memberParent": "Enterprise",
            "rollupOperator": "+",
            "memberDisplayLabel": "_Attribute_Default",
            "mapping": [
                {
                    "dimension": "Company",
                    "dimensionCode": [
                        "908",
                        "909",
                        "2020 AFN"
                    ]
                }
            ]
        }
    ]
}

Payload Sample JSON: Attribute Example

{
"modelName": "Financial Data",
"dimensionName": "colour",
"includeAttributes": true
}

Response

{
    "members": [
        {
            "memberCode": "Expense",
            "rollupOperator": "-",
            "memberDisplayLabel": "Expense"
        },
        {
            "memberCode": "28 DYN Income",
            "memberParent": "Expense",
            "rollupOperator": "+",
            "memberDisplayLabel": "28 DYN Income",
            "mapping": [
                {
                    "attribute": "color",
                    "attributeCode": "green"
                }
            ]
        },
        {
            "memberCode": "28 HYP A/C",
            "memberParent": "Expense",
            "rollupOperator": "+",
            "memberDisplayLabel": "28 HYP A/C",
            "mapping": [
                {
                    "attribute": "color",
                    "attributeCode": "red"
                }
            ]
        },
        {
            "memberCode": "28 Expense",
            "memberParent": "Expense",
            "rollupOperator": "+",
            "memberDisplayLabel": "28 Expense",
            "mapping": [
                {
                    "attribute": "color",
                    "attributeCode": "orange"
                }
            ]
        }
    ]
}

Payload Sample XML: Dimension Example

<?xml version="1.0" encoding="UTF-8"?>
<payload>
<model>Financial Data</model>
<dimension>Account</dimension>
<include-attributes>true</include-attributes>
</payload>

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Payload>
    <Member>
        <Member-Code>Expense</Member-Code>
        <Rollup-Operator>-</Rollup-Operator>
        <Member-Display-Label>Expense</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>28 DYN Income</Member-Code>
        <Member-Parent>Expense</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>28 DYN Income</Member-Display-Label>
        <Mapping>
            <Attribute>color</Attribute>
            <Attribute-Code>green</Attribute-Code>
        </Mapping>
    </Member>
    <Member>
        <Member-Code>28 HYP A/C</Member-Code>
        <Member-Parent>Expense</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>28 HYP A/C</Member-Display-Label>
        <Mapping>
            <Attribute>color</Attribute>
            <Attribute-Code>red</Attribute-Code>
        </Mapping>
    </Member>
    <Member>
        <Member-Code>28 Expense</Member-Code>
        <Member-Parent>Expense</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>28 Expense</Member-Display-Label>
        <Mapping>
            <Attribute>color</Attribute>
            <Attribute-Code>orange</Attribute-Code>
        </Mapping>
    </Member>
</Payload>

Payload Sample XML: Attribute Example

<?xml version="1.0" encoding="UTF-8"?>
<payload>
<model>Financial Data</model>
<dimension>colour</dimension>
<include-attributes>true</include-attributes>
</payload>

Response

Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Payload>
    <Dimension-Member>
        <Member-Code>colour</Member-Code>
        <Rollup-Operator>~</Rollup-Operator>
        <Display-Label>colour</Display-Label>
    </Dimension-Member>
    <Dimension-Member>
        <Member-Code>blue</Member-Code>
        <Member-Parent>colour</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Display-Label>blue</Display-Label>
    </Dimension-Member>
    <Dimension-Member>
        <Member-Code>orange</Member-Code>
        <Member-Parent>colour</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Display-Label>orange</Display-Label>
    </Dimension-Member>
    <Dimension-Member>
        <Member-Code>red</Member-Code>
        <Member-Parent>colour</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Display-Label>red</Display-Label>
    </Dimension-Member>
    <Dimension-Member>
        <Member-Code>green</Member-Code>
        <Member-Parent>colour</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Display-Label>green</Display-Label>
    </Dimension-Member>
    <Dimension-Member>
        <Member-Code>_Attribute_Default</Member-Code>
        <Member-Parent>colour</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Display-Label>_Attribute_Default</Display-Label>
    </Dimension-Member>
</Payload>

Payload Sample XML: Attribute Example with dimension leaf member disabled

<?xml version="1.0" encoding="UTF-8"?>
<payload>
    <model>Financial Data</model>
    <dimension>color</dimension>
     <include-dimensions>true</include-dimensions>
</payload>

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Payload>
    <Member>
        <Member-Code>color</Member-Code>
        <Rollup-Operator>~</Rollup-Operator>
        <Member-Display-Label>color</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>blue</Member-Code>
        <Member-Parent>color</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>blue</Member-Display-Label>
        <Mapping>
            <Dimension>Account</Dimension>
            <Dimension-Code>Account22</Dimension-Code>
        </Mapping>
    </Member>
    <Member>
        <Member-Code>orange</Member-Code>
        <Member-Parent>color</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>orange</Member-Display-Label>
        <Mapping>
            <Dimension>Account</Dimension>
            <Dimension-Code>28 Expense</Dimension-Code>
        </Mapping>
    </Member>
    <Member>
        <Member-Code>red</Member-Code>
        <Member-Parent>color</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>red</Member-Display-Label>
        <Mapping>
            <Dimension>Account</Dimension>
            <Dimension-Code>28 HYP A/C</Dimension-Code>
        </Mapping>
    </Member>
    <Member>
        <Member-Code>green</Member-Code>
        <Member-Parent>color</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>green</Member-Display-Label>
        <Mapping>
            <Dimension>Account</Dimension>
            <Dimension-Code>28 DYN Income</Dimension-Code>
        </Mapping>
    </Member>
    <Member>
        <Member-Code>_Attribute_Default</Member-Code>
        <Member-Parent>color</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>_Attribute_Default</Member-Display-Label>
        <Mapping>
            <Dimension>Account</Dimension>
            <Dimension-Code>Account21</Dimension-Code>
        </Mapping>
    </Member>
</Payload>

Payload Sample XML: Attribute - with dimension leaf member enabled

<?xml version="1.0" encoding="UTF-8"?>
<payload>
    <model>Financial Data</model>
    <dimension>color</dimension>
     <include-dimensions>true</include-dimensions>
</payload>

Response

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Payload>
    <Member>
        <Member-Code>908</Member-Code>
        <Member-Parent>_Attribute_Default</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>908 - Elim - Hot - Nev Corp</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>909</Member-Code>
        <Member-Parent>_Attribute_Default</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>909 - Elim - Hot - Nev Inc</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>2020 AFN</Member-Code>
        <Member-Parent>_Attribute_Default</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>2020 AFN</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>Enterprise</Member-Code>
        <Rollup-Operator>~</Rollup-Operator>
        <Member-Display-Label>Enterprise</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>Sales</Member-Code>
        <Member-Parent>Enterprise</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>Sales</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>Finance</Member-Code>
        <Member-Parent>Enterprise</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>Finance</Member-Display-Label>
    </Member>
    <Member>
        <Member-Code>_Attribute_Default</Member-Code>
        <Member-Parent>Enterprise</Member-Parent>
        <Rollup-Operator>+</Rollup-Operator>
        <Member-Display-Label>_Attribute_Default</Member-Display-Label>
        <Mapping>
            <Dimension>Company</Dimension>
            <Dimension-Code>908</Dimension-Code>
            <Dimension-Code>909</Dimension-Code>
            <Dimension-Code>2020 AFN</Dimension-Code>
        </Mapping>
    </Member>
</Payload>

Success Response

HTTP/1.1 200 OK

Error Responses

Service Not Available (Possibly due to maintenance)

HTTP/1.1 404 Not Found

One or more HTTP headers were missing

HTTP/1.1 412 Precondition Failed

Could not find payload body <payload>…</payload>

Could not find model: xxx

Could not find dimension: xxx

Dimension cannot be null or empty.

HTTP/1.1 412 Precondition Failed

Unauthorized Access (Access key lookup failed)

HTTP/1.1 401 Unauthorized

Invalid XML (Bad Request)

HTTP/1.1 400 Bad Request


Was this article helpful?

ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence