Trouble executing report with parameters via REST

I'm having some issues setting up the URI for calling a report design via REST. When using the Interactive REST API on port 5000, and calling POST /visuals/{visualId}/execute, I can pass in this as a paramValues parameter and it will work:




But, if I pass this in as a part of my own URI, it doesn't work. I've tried the following:








And I've also tried doing this:


var str = "{\"ParameterValue\":[{\"Name\":\"beginDate\",\"Value\":\"2017/06/29\"},{\"Name\":\"endDate\",\"Value\":\"2017/06/30\"}]}";


var validStr = encodeURIComponent(str);

Then having my URI be:

uriVisuals + '/' + runAndSaveReportId + '/execute' + '?authId=' + authId + '&paramValues=' + validStr


And that didn't work either.


I would get an error that would basically tell me that my endDate isn't being set, which I assume that also means it can't read the beginDate either. Could anyone clarify what it is I could be doing wrong? I just find it odd that it works just fine when calling it from the interactive documentation, but not from the ajax call I set up. The call that I have set up works just fine when I call a report design that doesn't have any parameters at all, it's only when I have parameters that this issue occurs.

Sign In or Register to comment.