Total requests in a time period via API

Hi,

Please assist with advice on querying the analytics API to view the total number of requests in the last month for a given host.
I require this data for 100+ hosts for each of our sites and am struggling to find a simple way to query the API to get it for one host.

Kind regards,
Sudeyan

2 Likes

I am wondering which GraphQL endpoint corresponds to the reports found there too. I was hoping to filter by path. So far I’ve just got

query {
  viewer {
    zones(filter: { zoneTag: zoneTag }) {
      httpRequests1dGroups(
        filter: { 
          date_gt: "2022-04-01"
        }
        limit: 1000
        orderBy: [date_ASC]
      ) {
        date: dimensions{date}        
        sum {
        	pageViews  
        }	
      }
    }
  }
}

but I’d like to filter (or group) by path too

oh you can look in the network tab when viewing these reports and search for “graphql” to see which queries they are running like ZapTimeseriesBydatetimeFifteenMinutesGroupedByall and GetZoneTopNs… the payload’s filters are of interest to me. It’s pretty straight forward to copy this over to graphiQL