Skip to main content

API

No Stability Guarantees

The EveBox API is currently under active development and may change without notice. Endpoints, request parameters, and response formats are not subject to semantic versioning or backward compatibility guarantees.

/api/sensors

Returns a list of all sensor names in your data.

Method: GET

Example:

curl "http://localhost:5636/api/sensors"

Response:

{
"data": ["sensor-1", "sensor-2", "sensor-3"]
}

/api/alerts

Returns aggregated alerts grouped by signature, source IP, and destination IP.

Method: GET

Parameters:

ParameterDescriptionExample
sensorFilter by sensor namesensor=my-sensor
time_rangeTime window to querytime_range=24h, time_range=7d
query_stringAdditional search filtersquery_string=src_ip:192.168.1.1
tagsFilter by tags (comma-separated)tags=evebox.escalated

Example:

# Get alerts from the last 24 hours
curl "http://localhost:5636/api/alerts?time_range=24h"

# Get alerts from a specific sensor
curl "http://localhost:5636/api/alerts?sensor=my-sensor&time_range=24h"

Response:

{
"events": [...],
"took": 42,
"timed_out": false,
"min_timestamp": "2025-12-28T00:00:00Z",
"max_timestamp": "2025-12-29T00:00:00Z"
}

/api/events

Returns individual events with optional filtering.

Method: GET

Parameters:

ParameterDescriptionExample
event_typeFilter by event typeevent_type=alert
query_stringKey:value filters (sensor uses host field)query_string=host:my-sensor
fromStart timestamp (ISO 8601)from=2025-12-28T00:00:00Z
toEnd timestamp (ISO 8601)to=2025-12-29T00:00:00Z
sizeMaximum number of resultssize=100
orderSort order (asc or desc)order=desc
sort_byField to sort bysort_by=timestamp

Example:

# Get alert events from a specific sensor
curl "http://localhost:5636/api/events?event_type=alert&query_string=host:my-sensor"

# Get the last 50 alerts
curl "http://localhost:5636/api/events?event_type=alert&size=50&order=desc"

/api/agg

Groups events over a field and returns the counts for each value. Similar to an SQL query like:

SELECT COUNT(event_type), event_type FROM events GROUP BY event_type ORDER BY count DESC;

Method: GET

Parameters:

ParameterDescriptionDefaultExample
fieldField name to group over(required)field=event_type
time_rangeTime range to search over24htime_range=7d
sizeNumber of results to return10size=20
orderSort order (desc or asc)descorder=asc
qOptional query string filterq=src_ip:192.168.1.1

Example:

# Get top 10 event types in the last 24 hours
curl "http://localhost:5636/api/agg?field=event_type"

# Get top 20 source IPs in the last 7 days
curl "http://localhost:5636/api/agg?field=src_ip&time_range=7d&size=20"

Response:

{
"rows": [
{"key": "alert", "count": 1234},
{"key": "dns", "count": 567},
{"key": "http", "count": 89}
]
}