running rest v2 report, what is 'path to report'?

0

Hello,

What do I put in the 'path/to/report'? as detailed in the rest v2 api:

http://<host>:<port>/jasperserver/rest_v2/reports/path/to/report.xxx

I cannot find a single instruction on what you enter here, so I'm starting to think I'm doing something wrong. If I look in Jasper Server it has as folders:

root\

Inside root\ there is a folder called 'Reports' and inside here is my report called 'test'

So I entered:

http://localhost:8082/jasperserver/rest_v2/reports/test.pdf

http://localhost:8082/jasperserver/rest_v2/reports/Reports/test.pdf

http://localhost:8082/jasperserver/rest_v2/reports/reports/test.pdf

The report also has a 'resource id' so I tried that and that didn't work either. Thing is, I don't know this is right because you can give a report any name you want including special characters and spaces so how can you enter this into the url if that's the case.
 
I can get it to work with other basic stuff like list of data sources, etc so I know the web service is working fine.
neil.walker's picture
Joined: Jul 5 2017 - 1:39am
Last seen: 2 years 1 month ago

1 Answer:

1

found it.

1. all folders are lowercase so \Reports becomes reports

2. the report has to use the 'resource id'

3. the resource ID has to match the case

 

so my URL was

http://localhost:8082/jasperserver/rest_v2/reports/reports/TestReport.pdf

So, it would be nice if the API guide was a little bit more helpful...

 

 

 

neil.walker's picture
Joined: Jul 5 2017 - 1:39am
Last seen: 2 years 1 month ago
Feedback
randomness