Params as Headers via REST Call.

Can you pass Params\InputControls as Headers instead of Query String via REST API?

reachme2405's picture
Joined: Dec 6 2018 - 5:15pm
Last seen: 3 years 7 months ago

1 Answer:

Hi ReachMe, 
You can have a look at the document "TIBCO JASPERREPORTS® SERVER REST API REFERENCE".
Section "CHAPTER 13 THE reportExecutions SERVICE"
I think this is the only way, besides making use of visualise.js (js lib for enterprise jaspersoft)

Make a report request first via a POST 
Example :

Content-Type : application/json

  "reportUnitUri" : "path_to_report_on_server/myfirstreport",
  "outputFormat" : "html",
  "parameters" : {    

If 200, you will received a xml response with a requestId in it. You will then make use of this requestid

Then you need to do a GET request with the requestid

if 200, you will receive a xml response, look into the <export> tag and look for the <id > 

You will required the id to do another GET reqeust. You need the requestid and the id above. 

if 200, then you will get response with the report. So in this scenario a html  document

Hope this helps you out.

joseng62's picture
Joined: Dec 5 2014 - 2:43am
Last seen: 4 months 3 days ago