My jasper server not showing running reports using rest_v2 service

Hi All,

 

I am getting values for jasper server like

http://<host>:<port>/jasperserver[-pro]/rest_v2/resources

but i am not geting running reports using below commands.

http://<host>:<port>/jasperserver[-pro]/rest_v2/reports

http://<host>:<port>/jasperserver[-pro]/rest_v2/reportExecutions

Do i need to modify anything in server to work those coomand ?please help.

Thanks

sushobhan.b's picture
Joined: Aug 22 2018 - 10:52pm
Last seen: 1 year 10 months ago

3 Answers:

It should be a matter of getting the right REST request format. There are examples in the REST API guide. The guide is downloadable from https://community.jaspersoft.com/documentation?version=59011

CHAPTER 13 REST API REFERENCE - THE reports SERVICE

vchiem's picture
36191
Joined: May 1 2017 - 5:33pm
Last seen: 1 week 5 days ago

@vchiem Yes I know about those formats, but when I am trying to get the report executions using this URI i am not getting anything.

http://:/jasperserver[-pro]/rest_v2/reportExecutions

Is anything i have to mention in XML properties?

sushobhan.b's picture
Joined: Aug 22 2018 - 10:52pm
Last seen: 1 year 10 months ago

I have the same issue. I am running a fresh Jasperserver CE in docker (bitnami image). I can interactively log into the server and create a test report that successfully runs. However, using the REST API, whenever I request 

http://<host>:<port>/jasperserver/rest_v2/reports,

I get an empty response with HTTP status 204 (no content). Other resources, such as login, logout, or 

http://<host>:<port>/jasperserver/rest_v2/resources

yield meaningful results. So the REST API works correctly in principle.

Is there some configuration change necessary so that reports can be listed via REST? 

matthias.budde - 2 years 8 months ago

I am unsure whether this solves your problem, but for my own (see comment above), it was  a matter of wrong expectations combined with a wrong user. I assumed

http://<host>:<port>/jasperserver[-pro]/rest_v2/reports

was supposed to list all reports, but that is not the case.

Similarly, I believe 

http://:/jasperserver[-pro]/rest_v2/reportExecutions

only shows the reports that are actually currently executing, not those scheduled to do so. 

Eventually it did work for me after using the correct requests and creating a new user with the role ROLE_USER (see also my answer to my problem at https://community.jaspersoft.com/questions/1163826/reports-rest-request-yields-empty-response-jasperreport-server)

matthias.budde's picture
Joined: Jul 14 2020 - 4:28am
Last seen: 2 years 7 months ago
Feedback
randomness