Events API

These endpoints read your events: the filtered list, one event's full detail, the runs on your es-python machines (listed, running now, as statistics and as CSV), counts and statistics, exports, the es-python map, and your saved searches. All of them are reads unless marked otherwise.

Query events

POST /api/get_all_events_with_count/ returns one page of your events, newest first unless you ask for another order, filtered the same way the events page filters them. It is a POST because the filters travel in a JSON body, but it is a read: a read-only key may call it, and it keeps working on an account limited to reading.

POST /api/get_all_events_with_count/
curl -s https://eyalsec.com/api/get_all_events_with_count/ \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"from":"2026-06-01","severity":["critical","high"],"blacklist_repr":"^healthcheck$"}'

Request body

Every field is optional, and an empty body returns the first page with no filters. Each field matches a control on the events page.

Field Meaning
cursor The next_cursor of the previous page, to get the next one. See paging.
sort The order: newest (the default, also what an omitted field means) or severity (most severe first). Any other value is a 400. See sort order.
view Which product's events: python (es-python) or browser (es-chromium). Omitted or empty means every product on your account. A product your account does not have is a 403; an unknown value is a 400. See event lists.
bucket live (the default: only events not suppressed), suppressed (only suppressed ones) or all. This is the page's Show control.
whitelist_repr A regex, case-insensitive. Keep only events whose where (the sink label, index 1 of a row) matches. Despite the name it is not matched against the value. See filtering.
blacklist_repr A regex, case-insensitive. Drop events whose where matches.
from, to Dates, YYYY-MM-DD or RFC3339. to includes the whole of that day.
machine One machine, by its display name (exact match).
severity A list from critical, high, medium, low, info. See severity.
sources A list of taint source categories from socket, file, stdin, env, argv, manual, fuzzer, foreign.
tags A list of impact classes, such as xss or sqli. Keeps events carrying any of them; an unknown class is a 400.
labels A list of your label ids. Keeps events carrying any of them.
xss_only true keeps only the es-chromium events whose sink can run script. It is the Can cause XSS button, and it must be sent with "view": "browser" (any other view is a 400).
raised_only true keeps only the events your machines stop instead of only reporting: those a Raise rule in force on that machine covers, refused blocked clients, stopped outbound connections, and rate-limit events while the rate limit blocks. It is the Raised only button. On a view whose product cannot raise it is a 400. See Raised only.
scope The scope bar, as {"mode": "ends", "value": ".example.com", "include_empty": false}. mode is is, ends or regex. See scope.
advanced The condition builder, as {"match": "all", "conditions": [{"field": "sink", "op": "contains", "value": "sql", "negate": false}]}. match is all or any; the fields depend on the view. See conditions.

Unknown values in severity and sources are ignored. An invalid scope or advanced is a 400 naming the problem.

xss_only keeps markup sinks, code sinks, script URLs and script bodies, attribute writes and navigations. It drops storage and cookie writes (the write itself runs nothing; a later read-back that reaches a script sink is its own event and is kept), style writes, outbound requests, messages, plain-text writes, and findings that report a fact about a page rather than a value reaching a sink.

Response

The answer is a list of events plus paging information. Each event is an array, not an object, to keep large pages small.

{
  "events": [
    ["2026-07-05T12:00:00Z", "socket-recv", "'...'", 3, "web-01", "high", "python", 12345,
     "", "", false, "This value was not sanitized.",
     [{"label": "data exfiltration", "sev": "medium"}],
     [{"id": 1, "name": "triage", "color": "amber"}], false, ""]
  ],
  "next_cursor": "",
  "scanned": 1,
  "exhausted": true,
  "oldest_examined": "2026-07-05T12:00:00Z",
  "event_limit": -1,
  "event_limit_monthly": false
}

The event row

Each event is an array of 17 values in a fixed order. New values are only ever added at the end, so read by position and ignore any extra values you do not know.

Index Field Meaning
0 created_at When the event was first seen.
1 where The sink label: what happened, where.
2 str_repr The value that reached the sink, as text.
3 count How many times it happened. See count.
4 machine_name The machine that reported it.
5 severity critical, high, medium, low or info.
6 agent_kind The product that reported it (one of the view values).
7 id The event id, for one event's detail, labels and notes.
8 source_label A short name for where the data came in. Empty for es-python and for products that do not report one.
9 context The page the flow happened on (es-chromium) or the file written to (an es-python write). Empty otherwise.
10 suppressed true when the sanitizer decided this value cannot reach its sink dangerously. See suppressed events.
11 sanitize_reason One sentence explaining that decision.
12 impact Up to three impact classes as {label, sev}, worst first. sev is the class's own severity, which can differ from the event's severity at index 5.
13 labels Your triage labels on this event, as {id, name, color}.
14 has_comment true when you have written a note on this event.
15 extension The browser extension an es-chromium event came from, by name (or id when the name is unknown). Empty otherwise.
16 taint_source The taint source of an es-python event, by the name a rule's source takes (socket, file, env, ...). Empty for other products and when no source was recorded.

The large fields (stack trace, origin, where the value was created, source code listings, your note's text) are not in the row, because shipping them on every row would make a page roughly a megabyte. Fetch them for one event with GET /api/event/{id}.

Paging

A page holds up to 100 events. To get the next page, send the next_cursor from the previous answer as cursor, with the same filters; when next_cursor comes back empty, you have everything.

A short page is not the last page. Each request looks at a bounded slice of your history so that no call runs for seconds, so a selective filter can return fewer than 100 events, or none, and still hand back a next_cursor. Keep following the cursor until it is empty, even after an empty page. A client that stops at the first empty page will report "no matches" for a search that has matches further back.

Three fields report progress: scanned is how many stored rows this request examined, exhausted is true when the scan reached the end of the range, and oldest_examined is the time of the oldest row it looked at. The events page uses them to show how far back a search has got.

When one of your enabled Hide rules matches every event (an empty pattern, or .*), nothing in the view can be shown, so the response comes back at once with no events, exhausted: true, and a hidden_by object holding that rule's id and label. A rule that comes from a Machines map policy has id 0, and hidden_by adds policy_id and policy_name for the policy it lives in. Turn the rule off or narrow its pattern to see events again.

Sort order

"sort": "severity" lists critical events first, then high, medium, low and info, newest first within each severity; any event with no recognised severity comes last. "sort": "newest" (or no sort at all) is plain time order, newest first. Both orders list exactly the same events, and every filter and the suppression bucket apply the same way to both.

A cursor belongs to the order that produced it. To change the order, start again without a cursor; sending a cursor from the other order is a 400 rather than a page that skips or repeats events. Everything in Paging holds in both orders, including empty pages that still carry a next_cursor.

curl -s https://eyalsec.com/api/get_all_events_with_count/ \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"view":"python","sort":"severity"}'

Export takes the same sort and writes the file in that order.

No event limit

Nothing caps the list. event_limit is always -1 and event_limit_monthly always false. Both are kept for older scripts.

One event's detail

GET /api/event/{id} returns the large fields the events list leaves out, for one of your events. id is index 7 of an event row.

GET /api/event/{id}
curl -s https://eyalsec.com/api/event/90210 \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000"
{
  "trace": "Traceback (most recent call last)...",
  "source": "",
  "origin": "{...origin...}",
  "repr_created": "<str 'id'>",
  "source_code": "/srv/app/handler.py:12\n  11    q = request.args['q']\n> 12    run(q)",
  "sink_code": "/srv/app/db.py:40\n> 40    cur.execute(sql)",
  "detail": "/var/www/app/handler.py",
  "comment": "",
  "extension": {"id": "", "name": "", "version": "", "label": ""},
  "runs": [
    {"run_uid": "9f2c1d4ab8e0472c93ad5f6178be20c4",
     "cmdline": "es-python app.py --port 8080 --token [masked]", "env": "",
     "count": 12, "first_seen": "2026-09-17T08:12:03Z", "last_seen": "2026-09-17T09:40:51Z"}
  ]
}
Field Meaning
trace The stack trace at the moment the value reached the sink. See stack trace.
origin Where the data came in. See origin.
repr_created Where the tainted value was created. See repr.
detail A secondary locator: the file a write went to, or the page an es-chromium event happened on.
rule_source The name to use as a rule's source for this event's taint source (for example socket, weak-random, db, a number for a make_vuln() value, or any when the source is unknown), so a rule you create through the rules API matches it. This is what the Events page's Rule row menu uses.
source_code, sink_code A few lines of your program's source around the line that created the value and the line that used it, each starting with a path:line header. Empty unless the machine is set to send source code.
comment Your own note on the event, empty when you have none.
extension The browser extension an es-chromium event came from: its 32-character id, and the name and version from its manifest when known. Show label, which is the name and version when known and the id otherwise. All empty when no extension was involved.
runs The runs that produced the event, newest first, at most 50. See below.
source Reserved. Always empty on your account.

Each entry in runs is one program invocation: its command line, its environment (empty unless the machine is set to send environment variables), how many of the event's occurrences it produced, and when it first and last did. Values that look like passwords, tokens or keys are masked. run_uid names that one invocation; pass it to the events query to see only what it produced (see runs). It is empty for events from an older agent, which groups invocations by command line and environment instead. The list is empty for an event reported without run information.

The event must be yours. An id that belongs to another account answers 404, exactly like one that does not exist. A non-numeric id is a 400.

List runs

GET /api/runs/ lists the runs on your es-python machines. Without sort it lists only the runs that produced at least one event. To list every run that checked in, including runs that produced no event, add sort=started. A run is one invocation of one monitored program: run es-python app.py and that is a run; run it again and that is another. See Runs.

GET /api/runs/
Parameter Meaning
machine One machine, by display name, the same name the events query's machine filter takes. The name must match exactly, letter case included. Omitted covers every machine on your account.
machine_id One machine, by its public_id from the machines list. Letter case does not matter.
secret One machine, by its internal machine secret. The API never hands out machine secrets, so use machine or machine_id instead.
q A case-insensitive piece of the command line.
status One or more statuses, comma-separated. See the table below.
program One program exactly as the program field gives it, such as app.py, -m pip, inline code, stdin script, interactive or --version.
user The operating-system user the run ran as, exact.
has_findings 1 for runs that produced at least one event the events page shows by default (not suppressed), 0 for runs that produced none.
since, until An RFC3339 time, such as 2026-10-28T00:00:00Z. Runs that started at or after since and before until.
run_uid One run by its id. That entry also carries env, the run's environment, empty unless the machine sends environment variables.
sort started lists every run your machines reported as it started, with or without events, newest start first. This is what the Python runs page shows, and the one to use for every run. Omitted, the list holds only the runs that produced at least one event (a suppressed one counts), newest event activity first. This is what the events page's run picker shows. It is also the only list with the runs known only from their events (event_only).
before The next_before of the previous page, passed back unchanged with the same sort. An unreadable value is treated as the first page.
limit Rows per page, 1 to 200. The default is 200.

A filter it cannot read, such as an unknown status or a time that is not RFC3339, answers 400 with a message naming the problem, rather than a wider list. An account without es-python answers 403.

curl -s "https://eyalsec.com/api/runs/?machine=web-01&sort=started&limit=50" \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000"
{
  "runs": [
    {"run_uid": "9f2c1d4ab8e0472c93ad5f6178be20c4",
     "cmdline": "es-python app.py --port 8080 --token [masked]",
     "first_seen": "2026-10-28T08:12:03Z", "last_seen": "2026-10-28T08:14:55Z",
     "events": 7, "occurrences": 31,
     "machine": "web-01", "machine_id": "3f6c1a52-8e0b-4d2a-9c1e-5b7d2f0a9e41",
     "status": "ended", "program": "app.py", "tags": [],
     "pid": 4242, "started_at": "2026-10-28T08:12:01Z", "heartbeat_at": "2026-10-28T08:14:31Z",
     "duration_s": 150, "beacons": 6, "heartbeats": 5,
     "py_version": "3.13.1", "cwd": "/srv/app", "os_user": "www",
     "worst_severity": "high"}
  ],
  "next_before": ""
}

events is how many distinct events that invocation produced, occurrences how many times it produced them, and worst_severity the highest severity among them (empty when there are none). All three count the events the events page shows by default, so suppressed events are left out and a run with events above 0 always opens to its events. Follow next_before until it comes back empty. A machine that is not yours gives an empty list.

A running program checks in when it starts and every 30 seconds after that. beacons counts every check-in, heartbeats the 30-second ones, and heartbeat_at is the latest. pid, started_at, heartbeat_at and duration_s are null on a run known only from its events. cmdline, cwd and os_user are empty when the machine is set not to send the command line. program is what you would call the run, worked out from its command line. tags can hold inline (code passed with -c), interactive, install (a pip or uv install) and root (the run ran as root).

status Meaning
running Checked in within the last 75 seconds.
starting Started in the last 45 seconds and has not yet reached its first 30-second check-in.
ended Stopped checking in. duration_s is from its start to its last check-in, accurate to 30 seconds.
short Ended before its first 30-second check-in.
untracked Not followed after it started. It ended within 30 seconds, or no taint sources are on.
event_only Known only from its events: the machine's agent does not report runs as they start. Update the machine to see every run.

duration_s is set for running and ended runs and null otherwise, and is never negative. started_at is the start the machine reported, unless that is later than its first check-in reached us or more than 7 days before it; then it is the time that check-in arrived.

To see the events of one run, add a run condition to the events query, on the es-python view. Under that filter each event's count is what that run contributed, not the event's all-time total. The same condition works on the export and the map. To see every run of one command instead, use the command field.

curl -s https://eyalsec.com/api/get_all_events_with_count/ \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"view":"python","advanced":{"match":"all","conditions":[
       {"field":"run","op":"is","value":"9f2c1d4ab8e0472c93ad5f6178be20c4"}]}}'

Runs running now

GET /api/runs/live/ returns the runs that are running or starting right now, newest check-in first, at most 500, each in the same shape as GET /api/runs/. machine or machine_id narrows it to one machine.

GET /api/runs/live/
{
  "runs": [
    {"run_uid": "9f2c1d4ab8e0472c93ad5f6178be20c4", "status": "running",
     "cmdline": "es-python app.py --port 8080", "machine": "web-01",
     "started_at": "2026-10-28T08:12:01Z", "heartbeat_at": "2026-10-28T08:14:31Z",
     "duration_s": 150, "events": 2}
  ],
  "as_of": "2026-10-28T08:14:40Z"
}

as_of is the server's clock: as_of minus heartbeat_at is how long ago the run last checked in, whatever your own clock says. The entries above are shortened; every field of the run list is present. A run that has sent a 30-second check-in leaves this list 75 seconds after its last one and shows as ended in the run list. A run that never sent one leaves it 45 seconds after its start and shows as short or untracked.

Run statistics

GET /api/runs/stats/ summarises your runs over a range: how many ran, which programs, on which machines, when, and how many produced findings. It is what the Python runs page's summary, activity chart, programs table and machines table show.

GET /api/runs/stats/
Parameter Meaning
since RFC3339 start of the range. The default is 24 hours before until. It is rounded down to its hour, in UTC.
until RFC3339 end of the range, not included. The default is now.
machine, machine_id Narrow every figure to one machine, by display name (exact, letter case included) or public_id (any letter case), as the run list does.

The range can be at most 400 days. A wider one, or a since that is not before until, answers 400. An account without es-python answers 403.

{
  "since": "2026-10-27T09:00:00Z", "until": "2026-10-28T09:12:00Z", "as_of": "2026-10-28T09:12:00Z",
  "summary": {"runs": 1290, "running": 4, "programs": 12, "with_findings": 37,
              "median_s": 42, "p95_s": 3610, "new_programs": 1, "overflow": 0},
  "series": {"bucket": "hour",
             "points": [{"t": "2026-10-27T09:00:00Z", "runs": 51, "with_findings": 2}]},
  "heatmap": [[0, 0, 3, 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],
  "programs": [{"program": "-m pip", "tags": ["install", "root"], "runs": 3, "machines": 1,
                "first_seen": "2026-10-28T07:00:00Z", "last_seen": "2026-10-28T07:00:00Z",
                "median_s": 14, "with_findings": 0, "running": 0, "new": true}],
  "machines": [{"machine": "web-01", "machine_id": "3f6c1a52-8e0b-4d2a-9c1e-5b7d2f0a9e41",
                "runs": 1290, "running": 4, "programs": 12, "last_run": "2026-10-28T09:11:58Z",
                "with_findings": 37, "beacons_seen": true, "cmdline_hidden": false, "sources_on": true,
                "series": [51]}]
}

The example is shortened: series.points and each machine's series have one entry per bucket, and heatmap has seven rows.

Field Meaning
since, until The range the figures cover, after since is rounded to its hour.
summary.runs Every run that started in the range.
summary.overflow How many of those were counted but not listed, because a machine started more runs in one minute than the run list keeps. They are included in summary.runs, in the runs of series, in heatmap, and in the runs of programs and machines. Every other figure (with_findings, running, the durations and the tags) comes from listed runs only.
summary.running Runs running or starting now, whatever the range.
summary.programs Distinct programs in the range. A run whose command line the machine does not send has no program and is not counted here.
summary.with_findings Listed runs in the range that produced at least one event the events page shows by default (not suppressed).
summary.median_s, summary.p95_s The median and 95th-percentile duration, in seconds, of the ended runs in the range. null when there are none.
summary.new_programs Programs whose first run on one of the machines in view falls inside the range. The same programs have new set in programs.
series Runs per hour for a range up to 48 hours, per day beyond, every bucket present, in UTC. The 48 hours are counted on the range you asked for, before since is rounded. with_findings is the part of runs that produced events. A run is placed by its started_at, in runs and in with_findings alike.
heatmap Runs by weekday (seven rows, Monday first) and hour of day (24 columns), in UTC. The cells add up to summary.runs.
programs The 200 busiest programs: runs, how many machines ran them, the first and last hour they were seen, median duration, runs with findings, runs running now and whether they are new. program is empty for the runs whose command line is not sent.
machines Every es-python machine in view. beacons_seen is false for a machine whose agent reports runs only through their events: update it to see every run. cmdline_hidden is true when its latest run came without a command line, which is what its settings ask for. sources_on is whether its settings keep a run reporting after it starts: a taint source, identity checks, an outbound connection policy or web protection is on. series is the machine's runs started per bucket, one number for each entry of series.points, in the same order.

Run counts, first seen and last seen reach back 400 days. The other facts come from the listed runs, which are kept 30 days unless they produced an event.

Export runs

GET /api/runs/export.csv downloads the runs that match the run list's filters as a CSV file, newest start first, as sort=started lists them. sort, before and limit are ignored.

curl -s "https://eyalsec.com/api/runs/export.csv?since=2026-10-01T00:00:00Z&has_findings=1" \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" -o python-runs.csv
started_at,machine,status,program,cmdline,os_user,cwd,pid,py_version,duration_s,events,worst_severity,run_uid
2026-10-28T08:12:01Z,web-01,ended,app.py,es-python app.py --port 8080,www,/srv/app,4242,3.13.1,150,7,high,9f2c1d4ab8e0472c93ad5f6178be20c4

A cell that a spreadsheet would read as a formula (it begins with =, +, -, @, a tab or a carriage return) starts with a single quote, so it opens as text. The file holds at most 50000 runs; a longer one ends with a row beginning TRUNCATED, so narrow the range or the filters for the rest. If the export fails on our side before the first run, it answers 500; if it fails part way, the file ends with a row beginning ERROR, so download it again. A filter it cannot read answers 400, and an account without es-python 403.

Event statistics

GET /api/get_event_stats/ returns the summary the dashboard shows: total hits, distinct event types, counts for the last hour, day and week, the top event types, recent events and a 14-day timeline.

GET /api/get_event_stats/

The answer is shown in the worked example. first_detection and latest_detection are absent when you have no events yet. The numbers are cached per account for a short time.

Three fields carry what the dashboard's status line, Needs attention list and chart use:

Field What it holds
timeline_14d[].by_severity that day's detections split by severity; the values add up to the day's count
events_24h_by_severity how many events (not detections) were first recorded in the last 24 hours, by severity
attention up to 8 critical and high events from the last 7 days, critical first, newest first, each with id, time, where, machine, severity, count and agent_kind

events_24h_by_severity and attention leave suppressed events out. An event whose severity is not graded yet is counted under ungraded.

Event count

GET /api/event_count/ returns how many events you have stored, with the same event_limit field (always -1).

GET /api/event_count/?view=python
{ "count": 1234, "view": "python", "event_limit": -1, "event_limit_monthly": false }

view is optional and takes the same values as the events query: pass one to count that product's list, or leave it out for the total across every product you have. A product your account does not have is a 403; an unknown value is a 400. The answer echoes the view it counted.

The count is cached per account and view and refreshed in the background, so repeat calls answer at once and may be a few minutes behind.

Event count per product

GET /api/event_view_counts/ returns how many events each of your products' lists would show. The events page uses it for the count beside each list in the sidebar.

GET /api/event_view_counts/
{ "python": 1204, "browser": 38 }

Every product on your account is always present, at zero when it has no events. An account with no products gets {}. Each number is narrowed exactly as the list is, by bucket, so a count and the list under it always agree.

Parameter Meaning
bucket live (default), suppressed or all, as on the events query.
scope Count only events whose scope key matches: the page host for es-chromium, and the first part of the origin (such as a file path) for es-python.
scope_mode is, ends or regex. Required with scope; a scope without it is ignored.
scope_empty true also counts events with no scope key.

The counts are cached and may be up to a minute behind. For a stored total, use /api/event_count/.

Live and suppressed totals

GET /api/event_visibility_counts/ returns how many of your stored events are shown and how many the sanitizer currently hides. The events page uses it for the numbers beside its Show control.

GET /api/event_visibility_counts/
{ "live": 1200, "suppressed": 34 }

Suppression never deletes anything, so the two numbers always add up to every event you have stored. Add ?machine=<name> to count one machine only (exact display name; an unknown name returns zeros). Nothing else narrows them: no product, scope, filter or bucket. The answer is cached and may be up to a minute behind.

Export events

POST /api/events_export downloads every event matching a filter as a CSV, JSON or SARIF file, instead of one page. The body is exactly the body of the events query, so the bucket and every filter select the same events the events page shows. See Export.

POST /api/events_export?format=csv

format is csv (the default), json or sarif; anything else is a 400. A cursor in the body is ignored, because an export is the whole set.

curl -s "https://eyalsec.com/api/events_export?format=csv" \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"view":"browser","severity":["critical","high"]}' \
  -o findings.csv

The CSV columns are:

id,created_at,severity,agent_kind,machine,sink,source,value,count,page_or_context,origin,repr_created,trace,suppressed,sanitize_reason,impact_tags,taint_chain

Every row carries the large fields the list leaves out (page and call site, origin, where the value was created, stack trace), so a finding in the file can be reproduced. The taint_chain column is always present and always empty on your account.

An export stops at 50,000 rows and always says so: the CSV ends with a row beginning TRUNCATED, the JSON sets "truncated": true, and the SARIF file sets runs[0].properties.truncated to true with a warning notification. Narrow the dates or the filter to get the rest.

SARIF

format=sarif returns a SARIF 2.1.0 log with the content type application/sarif+json and a .sarif file name. It is made for code scanning tools. To send it to GitHub, see Upload to GitHub code scanning.

curl -s "https://eyalsec.com/api/events_export?format=sarif&source_root=/srv/app" \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"view":"python","severity":["critical","high"]}' \
  -o findings.sarif
Query parameter Meaning
source_root Optional. The absolute folder your program ran from, such as /srv/app. File paths under it become relative to it. Anything that is not an absolute path is a 400.

The file has one run. tool.driver.name is EyalSec, and tool.driver.rules has one rule per sink. runs[0].automationDetails.id is eyalsec/<view>/, or eyalsec/all/ when no view is set. Each result has:

Field Value
ruleId the sink
level error for critical and high, warning for medium, note for low and info
message.text the severity, the class of the sink, where the data came from and the machine
locations the first stack frame in your own code with a file and line; for a page event, the script URL and line; otherwise the machine, as eyalsec://machine/<name>. The sink is always the logical location
stacks the stack frames that name a file and line, innermost first
partialFingerprints eyalsecEventKey/v1, stable for the same event, so a repeat upload updates the alert
occurrenceCount how many times the event happened
properties event_id, agent, machine, severity, source, value, origin, trace and the other export fields

Each rule's properties["security-severity"] reflects the worst event of that rule in the file, so GitHub sorts the alerts the way the events page does. The taint_chain property is never included on your account.

{
  "version": "2.1.0",
  "runs": [{
    "tool": {"driver": {"name": "EyalSec", "rules": [
      {"id": "os system", "shortDescription": {"text": "Command injection at os system"},
       "properties": {"security-severity": "9.5", "tags": ["security", "command injection"]}}
    ]}},
    "automationDetails": {"id": "eyalsec/python/"},
    "results": [{
      "ruleId": "os system",
      "level": "error",
      "message": {"text": "Critical. Command injection at os system: data from socket reached os system on web-01."},
      "locations": [{"physicalLocation": {
        "artifactLocation": {"uri": "app/handler.py", "uriBaseId": "SRCROOT"},
        "region": {"startLine": 12}}}],
      "partialFingerprints": {"eyalsecEventKey/v1": "3f2a9c0d5b7e41a6c8d2e0f19b4a7c55"},
      "properties": {"event_id": 12345, "agent": "es-python", "machine": "web-01"}
    }]
  }]
}

Map events

POST /api/event_map/ returns the matching es-python events as a graph: the sources the data came from, the files it was read from, and the sinks it reached. It is what the Map layout on the es-python events page draws (see Events map).

POST /api/event_map/

The body is the body of the events query, and view must be python (any other view is a 400). The bucket, tags and every filter select the same events the list shows.

curl -s "https://eyalsec.com/api/event_map/?sink=os%20system" \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"view":"python","from":"2026-07-01"}'
{
  "events": 3,
  "hits": 6,
  "truncated": false,
  "max_events": 0,
  "sources": [{"kind": "file", "events": 2, "hits": 3, "severity": "critical"},
              {"kind": "socket", "events": 1, "hits": 3, "severity": "high"}],
  "files": [{"path": "/srv/app/settings.py", "events": 2, "hits": 3, "severity": "critical"}],
  "sinks": [{"sink": "os system", "events": 3, "hits": 6, "severity": "critical"}],
  "links": [{"source": "file", "file": "/srv/app/settings.py", "sink": "os system", "events": 2, "hits": 3, "severity": "critical"},
            {"source": "socket", "file": "", "sink": "os system", "events": 1, "hits": 3, "severity": "high"}],
  "focus": {"events": [["2026-07-05T12:00:00Z", "os system", "'...'", 2, "web-01", "critical", "python", 12345,
                        "", "", false, "This value was not sanitized.", [], [], false, ""]],
            "truncated": false}
}

Each event is counted under its source (the same categories as the sources filter, plus other for data none of them describe), under its file when the source is file, and under its sink (its where). links lists every source, file and sink path; file is empty on a link whose source is not file, and a file path is empty for a file read without a known path. Every entry has events (stored events), hits (the occurrences those stand for) and severity (the worst among them), worst first. Only what your events contain appears.

Parameter Meaning
source Focus on one source: socket, file, stdin, env, argv, manual, fuzzer, foreign or other.
file Focus on one file path, exactly as it appears in files. Empty selects the file with no known path.
sink Focus on one sink, exactly as it appears in sinks.
only focus returns only the focus object, when you already have the graph. Needs one of the three above.

With a focus, the answer also carries focus.events: the newest 200 matching events in the same row shape as the events query, with focus.truncated set when there were more. The graph itself is not narrowed. A focus request reuses the map most recently built for the same body, which makes it fast, but reads the events fresh.

A map covers every event the filter selects, so truncated is false. A wide filter over a large account is a lot of work, so prefer a from and to window when you have one.

Event names

GET /api/event_names/ lists the distinct sink labels (the where field) across your events. Use it to build a filter or rule pattern.

GET /api/event_names/
{ "names": ["socket-recv", "file-open", "sql-execute"] }

Saved searches

A saved search is a named events-page query string: the product, scope, toolbar filters and conditions, exactly as they appear in the page's address. Choosing one puts the page back where it was. Unlike a filter, it changes nothing until you choose it. See Saved searches.

Searches are stored per product, because the searchable fields differ per product, so every call names one view.

List saved searches

GET /api/event_searches/ lists your saved searches for one product.

GET /api/event_searches/?view=browser
{ "searches": [ { "id": 3, "name": "my domain", "view": "browser",
                  "query": "view=browser&scope=shop.test" } ] }

view takes the same values as the events query and defaults to python. An unknown value is a 400; a product your account does not have is a 403.

POST /api/event_searches/ stores one named search. This is a write.

POST /api/event_searches/

JSON body: name (1 to 80 characters, trimmed), view, and query (the query string without the leading ?, at most 4096 characters). Saving the same name again in the same product overwrites it, which is how you edit a search. The answer is 201 with that product's whole list, so the new id is there without a second call.

curl -s https://eyalsec.com/api/event_searches/ \
  -H "X-API-Key: es2_EXAMPLEKEYdoNotUse0000000000000000000000" \
  -H "Content-Type: application/json" \
  -d '{"name":"my domain","view":"browser","query":"view=browser&scope=shop.test"}'

DELETE /api/event_searches/{id} removes one saved search and answers 204. This is a write.

DELETE /api/event_searches/{id}

An id that belongs to another account deletes nothing and still answers 204, so the answer never confirms that someone else's search exists.

Something unclear or missing on this page? Email support@eyalsec.com.

EyalSec Pricing Docs Security Research Vulnerabilities Play Security glossary About Contact עברית Login Get started Protect my Python app