Reporting stats API

Hi,

I’m currently working automating some script to pull in data for the following facts, I’m not able to find any New Relic reporting API that does the following, also finding Insight limiting as it doesn’t support multiple group by.

I’ll like to pull in the average page speed by deviceType, City, OS, browser…

Thanks

Hi @hassan.aljoubori: The only way that you can get that data is to present multiple queries to the Insights API. Be aware that the default values returned will automatically be filtered over the last hour and only return 50 items if you do not add additional filtering. So an example query for your deviceType would be:

SELECT average(duration) FROM PageView SINCE 1 day ago FACET deviceType

You could then change the FACET for userAgentName for the browser, userAgentOS for the OS and city for, erm well, city :grinning:

There are more handy NRQL queries in the library post.