Skip to main content
GET
/
pullzone
/
{pullZoneId}
/
optimizer
/
statistics
Get Optimizer Statistics
curl --request GET \
  --url https://api.bunny.net/pullzone/{pullZoneId}/optimizer/statistics \
  --header 'AccessKey: <api-key>'
{
  "TotalRequestsOptimized": 123,
  "TotalTrafficSaved": 123,
  "AverageProcessingTime": 123,
  "AverageCompressionRatio": 123,
  "RequestsOptimizedChart": {},
  "AverageCompressionChart": {},
  "TrafficSavedChart": {},
  "AverageProcessingTimeChart": {}
}

Authorizations

AccessKey
string
header
required

API Access Key authorization header

Path Parameters

pullZoneId
integer<int64>
required

(Optional) If set, the statistics will be only returned for the given Pull Zone

Query Parameters

dateFrom
string<date-time>

(Optional) The start date of the statistics. If no value is passed, the last 30 days will be returned.

dateTo
string<date-time>

(Optional) The end date of the statistics. If no value is passed, the last 30 days will be returned.

hourly
boolean
default:false

(Optional) If true, the statistics data will be returned in hourly groupping.

Response

The statistics data for the passed parameters.

TotalRequestsOptimized
number<double>
required

The total number of optimized requests

TotalTrafficSaved
number<double>
required

The total requests saved

AverageProcessingTime
number<double>
required

The average processing time of each request

AverageCompressionRatio
number<double>
required

The average compression ratio of CDN responses

RequestsOptimizedChart
object

The constructed chart of optimized requests

AverageCompressionChart
object

Average compression chart of the responses

TrafficSavedChart
object

The constructed chart of saved traffic

AverageProcessingTimeChart
object

The constructed chart of saved traffic