curl --request POST \
--url https://api.bunny.net/shield/event-logs/{shieldZoneId}/search \
--header 'Content-Type: application/json' \
--data '
{
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": [
"<string>"
]
}
],
"groupBy": [
"<string>"
],
"buckets": 123,
"page": 123,
"pageSize": 123
}
'import requests
url = "https://api.bunny.net/shield/event-logs/{shieldZoneId}/search"
payload = {
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": ["<string>"]
}
],
"groupBy": ["<string>"],
"buckets": 123,
"page": 123,
"pageSize": 123
}
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>']}],
groupBy: ['<string>'],
buckets: 123,
page: 123,
pageSize: 123
})
};
fetch('https://api.bunny.net/shield/event-logs/{shieldZoneId}/search', 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}/search",
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>'
]
]
],
'groupBy' => [
'<string>'
],
'buckets' => 123,
'page' => 123,
'pageSize' => 123
]),
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}/search"
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 \"groupBy\": [\n \"<string>\"\n ],\n \"buckets\": 123,\n \"page\": 123,\n \"pageSize\": 123\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}/search")
.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 \"groupBy\": [\n \"<string>\"\n ],\n \"buckets\": 123,\n \"page\": 123,\n \"pageSize\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunny.net/shield/event-logs/{shieldZoneId}/search")
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 \"groupBy\": [\n \"<string>\"\n ],\n \"buckets\": 123,\n \"page\": 123,\n \"pageSize\": 123\n}"
response = http.request(request)
puts response.read_body{
"rows": [
{
"logId": "<string>",
"timestamp": 123,
"log": "<unknown>",
"fields": {}
}
],
"groups": [
{
"key": {},
"count": 123,
"firstSeen": 123,
"lastSeen": 123,
"context": {},
"sparkline": [
123
]
}
],
"total": 123,
"totalPages": 123,
"page": 123,
"errorResponse": {
"statusCode": 100,
"success": true,
"message": "<string>",
"errorKey": "<string>"
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Search, filter and group Event Logs for a Shield Zone
curl --request POST \
--url https://api.bunny.net/shield/event-logs/{shieldZoneId}/search \
--header 'Content-Type: application/json' \
--data '
{
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": [
"<string>"
]
}
],
"groupBy": [
"<string>"
],
"buckets": 123,
"page": 123,
"pageSize": 123
}
'import requests
url = "https://api.bunny.net/shield/event-logs/{shieldZoneId}/search"
payload = {
"from": 123,
"to": 123,
"query": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"value": ["<string>"]
}
],
"groupBy": ["<string>"],
"buckets": 123,
"page": 123,
"pageSize": 123
}
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>']}],
groupBy: ['<string>'],
buckets: 123,
page: 123,
pageSize: 123
})
};
fetch('https://api.bunny.net/shield/event-logs/{shieldZoneId}/search', 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}/search",
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>'
]
]
],
'groupBy' => [
'<string>'
],
'buckets' => 123,
'page' => 123,
'pageSize' => 123
]),
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}/search"
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 \"groupBy\": [\n \"<string>\"\n ],\n \"buckets\": 123,\n \"page\": 123,\n \"pageSize\": 123\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}/search")
.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 \"groupBy\": [\n \"<string>\"\n ],\n \"buckets\": 123,\n \"page\": 123,\n \"pageSize\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bunny.net/shield/event-logs/{shieldZoneId}/search")
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 \"groupBy\": [\n \"<string>\"\n ],\n \"buckets\": 123,\n \"page\": 123,\n \"pageSize\": 123\n}"
response = http.request(request)
puts response.read_body{
"rows": [
{
"logId": "<string>",
"timestamp": 123,
"log": "<unknown>",
"fields": {}
}
],
"groups": [
{
"key": {},
"count": 123,
"firstSeen": 123,
"lastSeen": 123,
"context": {},
"sparkline": [
123
]
}
],
"total": 123,
"totalPages": 123,
"page": 123,
"errorResponse": {
"statusCode": 100,
"success": true,
"message": "<string>",
"errorKey": "<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
Request body for searching a Shield Zone's Event Logs within a time window.
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.EventLogsSearchRequest.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
Optional ordered dimensions to group by, e.g. ["ip","ja4"]. Omit for flat rows. Allowed: feature, ruleId, ip, ja4, ua, url, asn, country, action.
When grouping, the number of time buckets for each group's sparkline histogram over the window. 0 (default) omits the sparkline; clamped to 500.
Zero-based page index.
Page size; clamped to 1–500 (defaults to 50 when unset).
Response
OK
Result of an Event Logs search. Exactly one of BunnyNet.Shield.Api.Entities.Waf.WafLogging.EventLogsSearchResponse.rows or BunnyNet.Shield.Api.Entities.Waf.WafLogging.EventLogsSearchResponse.groups is populated.
Flat event rows (populated when the request had no groupBy).
Show child attributes
Show child attributes
Aggregated groups (populated when the request had a groupBy).
Show child attributes
Show child attributes
Total flat rows, or total distinct groups when grouped.
Total number of pages for the current page size.
Zero-based index of the returned page.
Generic response object containing status information for API operations.
Show child attributes
Show child attributes
Was this page helpful?