Interesting, but your example shows you are trying to export using "htmlFancy" output format. Even if a report is tabular, the output format could be choosen later at request time.
What happens if you add a parameter "reportFormat=xls" or "reportFormat=json" to your request?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That works, but i want to do a POST call, not a GET call, so I'm using: https://myArtServer/art/api/reports/run
and I am passing the parameters in the body but it doesn't work, I tried adding the reportFormat and got this:
{ "httpStatus": 500, "artStatus": "ERROR", "message": "rs must not be null", "data": null}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello Timothy, when I read your question I started to take screenshots and do tests regarding what you and Edson told me, and in the end I found the 2 errors that I had, the first one was not indicating the reportFormat, I thought ART would use the format by default defined when the report was created, and the second was not to put in front of the name of all my parameters "p-".
So thank you both very much for the help and sorry for the inconvenience.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, Is there some type of report (not html, important to be able to use the API) that paints the results of a query in an excel? Thanks.
The Tabular report type should work, with reportFormat=xlsx
That's what I thought, but when making the call I get that error:
Thats documented in manual:
"If a html report format is specified, a 400 response like the following would be returned
Yeah, i know, but im not using a html report format, im using tabular type like timothy says.
Interesting, but your example shows you are trying to export using "htmlFancy" output format. Even if a report is tabular, the output format could be choosen later at request time.
What happens if you add a parameter "reportFormat=xls" or "reportFormat=json" to your request?
In my server, I do execute GET requests like the one below:
https://myArtServer/runReport?reportId=123&reportFormat=json&username=MyUserName&password=MyPassword&directDownload=true
And it works fine.
That works, but i want to do a POST call, not a GET call, so I'm using:
https://myArtServer/art/api/reports/run
and I am passing the parameters in the body but it doesn't work, I tried adding the reportFormat and got this:
Could you post the parameters you are using.
Hello Timothy, when I read your question I started to take screenshots and do tests regarding what you and Edson told me, and in the end I found the 2 errors that I had, the first one was not indicating the reportFormat, I thought ART would use the format by default defined when the report was created, and the second was not to put in front of the name of all my parameters "p-".
So thank you both very much for the help and sorry for the inconvenience.
OK. Glad it worked out.