reachme2405 Posted November 4, 2019 Posted November 4, 2019 Can you pass ParamsInputControls as Headers instead of Query String via REST API?
joseng62 Posted November 13, 2019 Posted November 13, 2019 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 :https://localhost:8443/jasperserver/rest_v2/reportExecutionsHeadersX-REMOTE-DOMAIN : 1Content-Type : application/jsonBody { "reportUnitUri" : "path_to_report_on_server/myfirstreport", "outputFormat" : "html", "parameters" : { "option":[ { "name":"myInputControl_1", "value":["HelloValue"] }, { "name":"myInputControl_2", "value":["DAILY","WEEKLY","MONTHLY"] } ] }}If 200, you will received a xml response with a requestId in it. You will then make use of this requestid<requestId>2f373725-5190-43a3-8ea4-a8fa96f52a05</requestId>Then you need to do a GET request with the requestidhttps://localhost:8443/jasperserver/rest_v2/reportExecutions/2f373725-5190-43a3-8ea4-a8fa96f52a05if 200, you will receive a xml response, look into the <export> tag and look for the <id > <exports> <export> <attachments>…</attachments> <id>fdd2322d-2e48-4a63-a661-8155501a19fe</id>You will required the id to do another GET reqeust. You need the requestid and the id above. https://localhost:8443/jasperserver/rest_v2/reportExecutions/2f373725-5190-43a3-8ea4-a8fa96f52a05/exports/fdd2322d-2e48-4a63-a661-8155501a19fe/outputResourceif 200, then you will get response with the report. So in this scenario a html documentHope this helps you out.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now