I am currently trying to run a report thanks to Jasper Rest API and get the output (PDF), the interessant part of the doc is here
So I tried this : http://localhost:8080/jasperserver/rest/report/reports/samples/report_mongodb_new_basic
Knowing that my report is in reports/samples and its Resource ID is : report_mongodb_new_basic
So I still tried to run it with nodejs here is my code : (request is a nodejs module available here )
Login :
var request = require("request");
request.post({url: "http://localhost:8080/jasperserver/rest/login",
qs: {j_username: "jasperadmin", j_password: "jasperadmin"}},
function(err, res, body) {
if(err) {
return console.error(err);
}
After login, as the doc show I need to do a PUT request to run the report :
request.put("http://localhost:8080/jasperserver/rest
/report/reports/samples/report_mongodb_new_basic")
This isn't working of course, even when i directly go on this url with Firefox, it say
"Report not found (uuid not found in session)"
The uuid should be created thanks to this PUT request
So what is the good syntax of the URL and the good syntax of a PUT request to get the uuid and after if possible the pdf with a get?