You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Example of calling analyticsReportResult API

Question
17
Views
0
Comments
edited Jan 27, 2020 2:39PM in Applications Security

Content

Hi everybody,

I need to call analyticsReportResult POST API from bui code, 

I have the values of the parameters, and the call works if I use Postman, but from the bui code it doesnt work and returns a failed or a canceled status.

when I put a breakpoint I can see that this : if (this.readyState === 4 && this.status === 200), doesn't even happened. 

I would be thankful if you will be able to help me solve it.

the function is attached below.

 

Code Snippet

function changeName()

{    
            var url = "https://rnowgse00057.rightnowdemo.com/services/rest/connect/v1.4/analyticsReportResults";
            var data = {
              "id":13118      // the id of the table that I want to get
            };

          var xhr = new XMLHttpRequest();
        

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!