can we get Json response from Jasper REST api

I have the URL   "http://<ipaddress>:port/jasperserver/rest_v2/reports/reports/path/reportname?j_username=username&j_password=newpasswrd&inputparam1=value1&inputparam1=value2"  , 

thru REST api ,is it possible to get Json output. 

please share the input 

murugesan.vinoth's picture
Joined: Jul 30 2019 - 2:21am
Last seen: 3 years 4 months ago

4 Answers:

Accordingly with documentation "JasperReports-Server-REST-API-Reference"
you can
make your URL like  this:
"http://<ipaddress>:port/jasperserver/rest_v2/reports/reports/path/reportname.<format>?j_username=username&j_password=newpasswrd&inputparam1=value1&inputparam1=value2"

Quote from documentation:

<format>
output type

One of the following formats: pdf, html, xls, xlsx, rtf, csv, xml, docx, odt, ods,
jrprint.
As of JasperReports Server 6.0, it is also possible to specify json if your
reports are designed for data export. For more information, see the
JasperReports Library samples documentation.
One of the following formats:
• Regular output: html, pdf, csv, docx, pptx, xls, xlsx, rtf, odt, ods, xml
• Metadata output: data_csv, data_xls, data_json

ogavavka's picture
1012
Joined: Mar 12 2012 - 2:10pm
Last seen: 1 week 5 days ago

but its not working while embedding in HTML page. 

I need to embedded the report output in HTML page. I have tried for extension "JPRINT" , the embedded HTML  page looks like a pdf page. 

 

 

 

murugesan.vinoth's picture
Joined: Jul 30 2019 - 2:21am
Last seen: 3 years 4 months ago

Well that's a compleetly different question...
there are many ways how you can integrate report in your page and what you will get in result.
if you need a live report in your page - look at Visualize.js

ogavavka's picture
1012
Joined: Mar 12 2012 - 2:10pm
Last seen: 1 week 5 days ago

yes, Visualise.js is for Enterprise edition. 

am looking for Community edition , 

any other way in CE. 

 

murugesan.vinoth's picture
Joined: Jul 30 2019 - 2:21am
Last seen: 3 years 4 months ago
Feedback