Quantcast
Channel: All AppDynamics Discussions posts
Viewing all articles
Browse latest Browse all 1667

Problem using REST API from AJAX (CORS problem).

$
0
0

Hi,

I'm trying to use the REST API from inside a webpage using AJAX, and I am facing a CORS problem.

I'm invoking the applications list using this url, (which works fine from a browser tab) :

 

https://mycompany.saas.appdynamics.com/controller/rest/applications?output=JSON

 

I am getting an http code 200, but with no Allow-Control-Allow-Origin header, so the browser is throwing this error :

 

 

XMLHttpRequest cannot load https://mycompany.saas.appdynamics.com/controller/rest/applications?output=JSON. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.

 

What do I need to do to get the REST API working from within an html page?

(this is saas dedicated environment)

Thanks in advance


Viewing all articles
Browse latest Browse all 1667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>