Adding an Input Control to a Document

Usage

Adds a new input control to a document.

Request

POST /documents/<documentID>/inputcontrols

The request body must adhere to the following rules:

  • The widget must be compatible with the assigned data object, for example: slide on a measure, radio buttons on a dimension.
  • The widget must be compatible with the operator.
Response

Response type: application/xml or application/json

The response is a message stating the success or failure of the request.

Example

XML

POST /documents/6671/inputcontrols

Request body:

<inputcontrol> 
    <name>my checkbox_1</name>  
    <checkBox allowAllValuesSelection="true" useCustom="false" operator="InList"/> 
    <assignedDataObject refId="DP0.DO39"/>  
</inputcontrol>

Response:

<success>
    <message>The resource of type "Input Control" with identifier "D.IF1" has been successfully created.</message>
    <id>D.IF1</id>
</success>

Example

JSON

POST /documents/5152/inputcontrols

Request body:

{"inputcontrol":{
    "name":"my checkbox_1",
    "checkBox":
     {"@allowAllValuesSelection":"true",
      "@useCustom":"false",
      "@operator":"InList"},
    "assignedDataObject":{"@refId":"DP0.DO1fc"}
    }
}

Response:

{"success":
    {"message":"The resource of type \"Input Control\" with identifier \"D.IF0\" has been successfully created.",
     "id":"D.IF0"}
}