Export the full filtered Event Logs set for a Shield Zone as CSV
curl --request POST \
--url https://api.bunny.net/shield/event-logs/{shieldZoneId}/export \
--header 'Content-Type: application/json' \
--data '
{
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": [
"<string>"
]
}
]
}
'import requests
url = "https://api.bunny.net/shield/event-logs/{shieldZoneId}/export"
payload = {
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": ["<string>"]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from: 123,
to: 123,
query: '<string>',
filters: [{field: '<string>', op: '<string>', value: ['<string>']}]
})
};
fetch('https://api.bunny.net/shield/event-logs/{shieldZoneId}/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bunny.net/shield/event-logs/{shieldZoneId}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => 123,
'to' => 123,
'query' => '<string>',
'filters' => [
[
'field' => '<string>',
'op' => '<string>',
'value' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bunny.net/shield/event-logs/{shieldZoneId}/export"
payload := strings.NewReader("{\n \"from\": 123,\n \"to\": 123,\n \"query\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bunny.net/shield/event-logs/{shieldZoneId}/export")
.header("Content-Type", "application/json")
.body("{\n \"from\": 123,\n \"to\": 123,\n \"query\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunny.net/shield/event-logs/{shieldZoneId}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": 123,\n \"to\": 123,\n \"query\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Event Logs
Export the full filtered Event Logs set for a Shield Zone as CSV
POST
/
shield
/
event-logs
/
{shieldZoneId}
/
export
Export the full filtered Event Logs set for a Shield Zone as CSV
curl --request POST \
--url https://api.bunny.net/shield/event-logs/{shieldZoneId}/export \
--header 'Content-Type: application/json' \
--data '
{
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": [
"<string>"
]
}
]
}
'import requests
url = "https://api.bunny.net/shield/event-logs/{shieldZoneId}/export"
payload = {
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": ["<string>"]
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
from: 123,
to: 123,
query: '<string>',
filters: [{field: '<string>', op: '<string>', value: ['<string>']}]
})
};
fetch('https://api.bunny.net/shield/event-logs/{shieldZoneId}/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bunny.net/shield/event-logs/{shieldZoneId}/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => 123,
'to' => 123,
'query' => '<string>',
'filters' => [
[
'field' => '<string>',
'op' => '<string>',
'value' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bunny.net/shield/event-logs/{shieldZoneId}/export"
payload := strings.NewReader("{\n \"from\": 123,\n \"to\": 123,\n \"query\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bunny.net/shield/event-logs/{shieldZoneId}/export")
.header("Content-Type", "application/json")
.body("{\n \"from\": 123,\n \"to\": 123,\n \"query\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunny.net/shield/event-logs/{shieldZoneId}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": 123,\n \"to\": 123,\n \"query\": \"<string>\",\n \"filters\": [\n {\n \"field\": \"<string>\",\n \"op\": \"<string>\",\n \"value\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
The ID of the Shield Zone.
Body
application/jsontext/jsonapplication/*+json
Request body for exporting a Shield Zone's full filtered Event Logs set as CSV.
Window start as Unix time in milliseconds (UTC). Required.
Window end as Unix time in milliseconds (UTC). Required; must be after BunnyNet.Shield.Api.Entities.Waf.WafLogging.EventLogsExportRequest.from and within the last 72 hours.
Optional free-text search across IP, ruleId, URL, User-Agent and rule name.
Optional filters, combined with AND. Repeated values within one filter combine with OR.
Show child attributes
Show child attributes
Response
OK
The response is of type file.
Last modified on July 24, 2026
Was this page helpful?
Search, filter and group Event Logs for a Shield ZoneGet the overage breakdown for the specified Shield Zone for a given month, segmented by billing plan changes
⌘I