Skip to main content
GET
/
v2
/
pullzones
/
{pullZoneId}
/
logs
Query CDN access logs for a pull zone.
curl --request GET \
  --url https://api.example.com/v2/pullzones/{pullZoneId}/logs
{
  "data": [
    {
      "timestamp": "2023-11-07T05:31:56Z",
      "pullZoneId": 123,
      "requestId": "<string>",
      "cacheStatus": "<string>",
      "statusCode": 123,
      "bytesSent": 123,
      "edgeLocation": "<string>",
      "scheme": "<string>",
      "host": "<string>",
      "path": "<string>",
      "url": "<string>",
      "remoteIp": "<string>",
      "countryCode": "<string>",
      "userAgent": "<string>",
      "referer": "<string>",
      "bodyBytesSent": 123,
      "contentRange": "<string>",
      "authorizationHeader": "<string>",
      "ja4Fingerprint": "<string>",
      "asn": 123,
      "asnOrganization": "<string>"
    }
  ],
  "pagination": {
    "offset": 123,
    "limit": 123,
    "returned": 123,
    "hasMore": true
  },
  "query": {
    "pullZoneId": 123,
    "from": "2023-11-07T05:31:56Z",
    "to": "2023-11-07T05:31:56Z",
    "order": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.bunny.net/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

pullZoneId
integer<int64>
required

Query Parameters

from
string<date-time>

Inclusive start of the time range (UTC). Defaults to To - 24h. Must fall within the 3-day log retention window. The total range (To - From) cannot exceed 3 days.

to
string<date-time>

Exclusive end of the time range (UTC). Defaults to now.

status
string

Comma-separated list of HTTP status filters. Each entry can be an exact code (e.g. 200, 404) or a status class (e.g. 2xx, 5xx). Multiple entries are combined with OR.

cacheStatus
string

Comma-separated list of cache statuses to match exactly (e.g. HIT,MISS,EXPIRED).

country
string

ISO 3166 alpha-2 country code (e.g. EE). Multiple values can be comma-separated.

edgeLocation
string

Edge location / server zone (exact match).

remoteIp
string

Client IP address filter (IPv4 or IPv6). The match width adapts to the zone's IP anonymization setting so the filter can never reveal information beyond what the API returns: exact match when anonymization is disabled, /24 (IPv4) or /64 (IPv6) when last-octet anonymization is enabled, and ignored when full anonymization is enabled.

urlContains
string

Case-insensitive substring match against the request URL (host + path).

userAgentContains
string

Case-insensitive substring match against the User-Agent header.

refererContains
string

Case-insensitive substring match against the Referer header.

Free-text, case-insensitive token search. Tokens are space-separated; a row matches if ANY token appears in ANY of the searched columns: cache status, request ID, edge location, host, path, user agent, referer, and (for zones with extended logging) content range. Remote IP, country code, and the authorization header are not searched. use the dedicated filters for those, or note that the authorization header is encrypted at rest. Limited to 16 tokens of at most 128 characters each.

requestId
string

Exact request ID (UUID) to look up a single log entry.

includeOriginShield
boolean

Include origin-shield (edge → shield) requests. Defaults to false to match v1.

limit
integer<int32>

Maximum entries to return. Defaults to 100. Capped at 10000.

offset
integer<int64>

Number of entries to skip. Defaults to 0.

order
string

Sort order by timestamp: asc or desc (default).

Response

Successful query with paginated results.

Paginated response wrapper for log queries.

data
object[] | null
required

Log entries matching the query, in the requested sort order.

pagination
object
required
query
object
required