Adds a regular or grouping variable definition to a Web Intelligence document.
POST <webiURL>/documents/{documentId}/variables
Where:
Request body in the case of a regular variable:
<variable qualification="Measure|Attribute|Dimension"> <name> <definition>
Where:
Request body in the case of a grouping variable:
<variable grouping="true"> <dimensionId> <groups> <group> <name> <values> <value>
The name of the variable is computed if not provided by the user or in case of name conflict.
Response type: application/xml or application/json
The response is a message stating the success or failure of the request.
POST <webiURL>/documents/4326/variables
Request body:
<variable qualification="Measure"> <name>new variable</name> <definition>=[RevenueThreshold]*[Threshold factor]</definition> </variable>
Response:
<success> <message>The resource of type 'Variable' with identifier 'LB' has been successfully created.</message> <id>LB</id> </success>
POST <webiURL>/documents/6409/variables
Request body:
<variable grouping="true"> <dimensionId>DP0.DOb9</dimensionId> <groups> <group> <name>From January to April</name> <values> <value>1</value> <value>2</value> <value>3</value> <value>4</value> </values> </group> <group> <name>Summer Holidays</name> <values> <value>7</value> <value>8</value> </values> </group> </groups> </variable>
Response:
<success> <message>The resource of type 'Variable' with identifier 'L3' has been successfully created.</message> <id>L3</id> </success>