Temp O'rary
Temp O'rary

Reputation: 5808

How to get/extract New Relic Insights data at the client side using JavaScript Ajax calls via NRQL queries

Can we extract data from New Relic Insights using client side JavaScript and Ajax calls via NRQL queries?

Apart from others mentioning New Relic REST API, I've seen the following documentation, which like others talk about curl commands Querying your data remotely

Is this possible at the client side JavaScript using something like Ajax calls.

Upvotes: 0

Views: 381

Answers (1)

Temp O'rary
Temp O'rary

Reputation: 5808

Since the origin of the XMLHttpRequest (XHR) or Ajax is different to the requested API's URL, Cross-origin resource sharing (CORS) prevents from accessing the API. Hence, this doesn't work. To implement this, the API will have to be requested by the back-end via .NET, JAVA, PHP, Python, etc. any server side technology and the result will have to be sent to the client Ajax calls.

Upvotes: 0

Related Questions