The following method validates the input controls that you send, to ensure that they can be used in the next run of the report.
Method |
URL |
||
POST |
http://<host>:<port>/jasperserver[-pro]/rest_v2/reports/path/to/report/inputControls/<ic1>; |
||
Content-Type |
Content |
||
application/json |
A JSON object that lists your selected values. The value of every input control is given as an array of string values, even for single-select controls or multi-select controls with a single value. See also the example below: { "boolean-input-control" : ["true"], "integer-input-control" : ["123456"], "single-select-input-control" : ["some value"], "multiple-select-input-control-1" : ["another value"], "multiple-select-input-control-2" : ["first", "second", "third"] } |
||
Options |
|||
accept: application/json |
|||
Return Value on Success |
Typical Return Values on Failure |
||
200 OK – The content is a JSON object that describes the new selection of input control values. |
404 Not Found – When the specified report URI is not found in the repository. |
Assuming the client receives the response given in section Listing Input Control Values, it can send the following request body:
{ "Country_multi_select":["Mexico"], "Cascading_state_multi_select":["Guerrero", "Sinaloa"] } |
When specifying the option for the JSON format, the server’s response is:
{ "inputControlState" : [ { "uri" : "/reports/samples/.../Country_multi_select", "value" : "", "options" : { "label" : "Canada", "selected" : "false", "value" : "Canada" }, { |
"label" : "Mexico", "selected" : "true", "value" : "Mexico" }, { "label" : "USA", "selected" : "false", "value" : "USA" } }, ... ] } |