Skip to main content
Threat detection endpoints need a signed-in superadmin session, not an API token. For what the detectors look for, see Threat detection.

Endpoints

Listing findings

GET /api/threats/findings and /api/threats/groups take:
string
default:"open"
open (new and acknowledged), all, new, acknowledged, muted or resolved.
string
dga, tunnel, new_domain, baseline or feed.
string
One client address.
string
The domain or a parent of it.
string
Client or domain containing this.
integer
default:"200"
At most 1000 (5000 for groups).

Changing findings

A mute rule (POST /api/threats/mutes) takes detector, client (address or network), domain, hours (empty or 0 = for good), comment and apply (also mute the open findings it matches, default true). An allow entry (POST /api/threats/allow) takes domain, comment and resolve (resolve its open findings and lift its block, default true).

Feeds

POST /api/threats/feeds takes name, url and auth_key (sent as the Auth-Key header, for abuse.ch) and downloads the feed right away; a failed download is returned as error and kept on the feed. PATCH takes name, url, enabled and auth_key ("" removes it). Feeds come back with has_key, never the key.

Settings

PUT /api/threats/settings takes the whole settings object as GET returns it: enabled, retention_days, one object per detector (dga, tunnel, new_domain, baseline, feed) with enabled, threshold, window_minutes, alert, block and its own limits, alerts (enabled, client_cooldown_minutes, max_per_hour) and auto_block (enabled, hours). Missing fields get their defaults; values out of range are a 400.