Running a report with REST API


I am new to JASPER. I am trying to use postman to call jasper report before writing a code for the application. Unfortunately the documentation is not explaining the steps needed in a sequence. 

This is the url i am using. http://jrfir01aplxa:8080/jasperserver-pro/rest/login?j_username=username&j_password=pass

I believe valid login is needed. When i use the following URL in postman and provide the credentials i am able to see a response in HTML, which contains

Create Report

To begin creating a report, select an Ad Hoc view.

I feel thats an indication that the login request has been successful. 

Next, i like to call the method to execute the existing report and display in browser. From the documentation

i have picked this url 

http://MYSERVER:8080/jasperserver-pro/rest_v2/reportExecutions (Is this the correct URL to use??)


Using PUT in postman

Here is the body in postman that i have added but i get an error

         /organizations/my_company_Reporting/organizations/My_System/Reports/NEW ACCOUNTS
        <reportParameter name="PARAM 2">
        <reportParameter name="PARAM 1">


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        There was an error on the server. Try again or contact site administrators.
        (Error UID: 1d3bcc3c-07f2-47d4-a902-e66b48522ce5)

Can anyone review and let me know what will be the correct output that i should be able to get

Also is there any example in documentation or other wise where it shows a sequence of steps versus a list of methods.

  1. How to call the report (i believe login is needed, how to tie the login before calling the report) service to execute a rerport

  2. How do we show the response back to the user, Is it like SSRS that it will show up in browser when we define the format is pdf or html?

Thank you.

khurram.bilal's picture
Joined: Oct 5 2018 - 11:59am
Last seen: 3 years 7 months ago

I do not about SSRS and I am also learning jasper. So, with the inforamtion you gave:

1 . Check your jasper server logs for more informatin.

2. The error says "serialization.error" that means you are sending wrong data to your report. What are the input controls (PARAM 2, PARAM 1) for the report "NEW ACCOUNT", are you able to run this report directly from jasper server UI ? 

Coming to your question on postman:

How to call the report (i believe login is needed, how to tie the login before calling the report) service to execute a rerport - 

to tie the login in POSTMAN:

1. In the url field paste your server url to reportexecution: http://MYSERVER:8080/jasperserver-pro/rest_v2/reportExecutions 

2. Select the method to "POST"

3. In the authorization tab , select basic auth, enter user name and password

4.  In the headers tab, you may add:

 Key                               Value

Content-Type                  application/xml
Accept                             application/xml

note: X-REMOTE-DOMAIN   1 may not be necessary, but try adding it if you get any error.

5. In the body tab, paste your request (xml)

 example: <reportExecutionRequest>

6. Send

response should be somthing like :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

and then work with export Id and request id and follow :

kothany - 4 years 9 months ago

we are  Migrating Jasper  Server 4.1 to 7.1 REST V2 API. 

dont see any api method to deploy JRXML files and retrive Report .

Can you pelase help on this. 

vinothm2k - 4 years 9 months ago

0 Answers:

No answers yet