I am trying to Get a list of all servers on my New Relic account through the REST API but only an empty list is being returned. I can be able to see the Servers/Hosts from New Relic Dashboard. What might be the Issue?
From the New Relic support team, this was the solution
If you are using this endpoint: https://api.newrelic.com/v2/servers.json, it is for the New Relic Servers product, which has been discontinued. If you are using New Relic Infrastructure, you may get a list of servers from Insights:
SELECT uniques(hostname) FROM SystemSample If you are not using Infrastructure, you may get a list of host names associated with your APM applications:
SELECT uniques(host) FROM Transaction