Getting the Definition of a Variable

Usage

Gets the definition of a variable from the variable dictionary of a Web Intelligence document.

Request

GET /documents/<documentID>/variables/<variableID>

Response

Response type: application/xml or application/json

Response body: definition of the variable, described as follows:

  • dataType and qualification attributes of <variable> are the type and qualification of the variable (measure, attribute or dimension)
  • <id>
  • <name> is the name of the variable, as used in the document
  • <description> optional, can be used to describe how the variable is used
  • <formulaLanguageId>
  • <definition> is the formula used by the variable

Example

Regular Variable

GET /documents/1234/variables/L9

<variable dataType="Numeric" qualification="Measure">
    <id>L9</id>
    <name>Threshold Max</name>
    <description></description>  
    <formulaLanguageId>[Threshold Max]</formulaLanguageId>    
    <definition>=[RevenueThreshold]*(1+[Threshold factor])</definition>
</variable>

Example

Grouping Variable

GET /documents/6409/variables/L2

<variable grouping="true" dataType="String" qualification="Dimension">
    <id>L1</id>
    <name>Month+</name>
    <formulaLanguageId>[Month+]</formulaLanguageId>
    <dimensionId>DP0.DOb9</dimensionId>
    <groups>
        <group>
            <name>Q1</name>
            <values>
                <value>1</value>
                <value>2</value>
                <value>3</value>
            </values>
        </group>
        <group>
            <name>Q3</name>
            <values>
                <value>7</value>
                <value>8</value>
                <value>9</value>
            </values>
        </group>
        <group ungroupedValues="AutomaticallyGrouped">
            <name>Others</name>
            <values>
                <value>4</value>
                <value>5</value>
                <value>6</value>
                <value>10</value>
                <value>11</value>
                <value>12</value>
            </values>
        </group>
    </groups>
</variable>