API
JSON over HTTP on the API listener (127.0.0.1:17454 by default),
authenticated by a token: Authorization: Bearer <token>.
shieldlist-controller api-token -name NAME mints the first one at the
Web UI; POST /v1/tokens the next. Every write is audited under the
token's name and is a write to the configuration files, reloaded whole
or reverted with the loader's errors as the answer.
| Endpoint | What |
|---|---|
GET /v1/version |
the controller's version and the oldest agent it serves |
GET /v1/agents, GET /v1/agents/{host} |
the enrolled machines: versions, seen (and from which address), revision held and wanted, switches, enforcement summary, active bans — plus where the geo databases place the last address (country, city, lat/lon with the city database), which is where the map draws the server |
GET|PATCH /v1/agents/{host}/declaration |
agents/<host>.yaml: level, state, lift, reporting, offer, enforce, description, packs: [{name, state, level}], logs: [{path|unit, log, ports}], rules: {name: {level|threshold, state, ban} | {} to add | null to drop} — created when absent |
GET /v1/agents/{host}/rules |
what the machine runs: each rule with the packs that brought it (or added), its threshold there and why, its state, its outcome |
GET /v1/packs, POST /v1/packs {name, description, rules}, PATCH /v1/packs/{name} {description, rules}, DELETE /v1/packs/{name} |
the packs — lists of rules — with the servers given each; a pack cannot go while a server has it |
GET /v1/rules, POST /v1/rules {name, dir, category, description, log, parsers, threshold, ban, notify, report, count, distinct, state, share}, PATCH /v1/rules/{name}, DELETE /v1/rules/{name} |
the rules, each with its parsers ({parser, weight} or {regex, prefilter, inline}), threshold, ban, notify, report, count, state, share, the packs listing it, the servers running it. parsers replaces the list; ?preview=1 answers {path, before, after} without writing |
GET /v1/parsers, POST /v1/parsers {name, dir, log, prefilter | prefilter_any, regex, time_field, time_format}, PATCH|DELETE /v1/parsers/{name}, POST /v1/parsers/test {regex, prefilter, prefilter_any, lines} |
the parsers (inline ones marked with their rule — edit the rule); the test answers each line gated, matched, with the fields captured |
GET /v1/policies, POST /v1/policies {name, durations, ports (all | service | "80, 443"), memory, tighten, duration_start, reputation ("90/30d")}, PATCH|DELETE /v1/policies/{name} |
the ban policies, with the rules using each |
GET /v1/reports, POST /v1/reports {name, to, when, categories, says, include}, PATCH|DELETE /v1/reports/{name} |
the report presets (the built-in default editable) |
GET|PUT /v1/files/{path} |
one file of the tree whole; ?validate=1 on PUT tries it through the loader and puts it back |
GET /v1/sanctions?state=&agent=&rule=&q=&country=&asn=&since=&until=&limit=&offset=&evidence=1&copies= |
the fleet's sanctions, newest first, bounded (limit ≤ 1000); asn takes one network or several comma-separated; state is active (banned now), bans (enforced, in force or not), recorded (detections), expired, lifted or all; rule contains; q is one search box — an address or its start, a rule, a server, a country code, an AS by number or name; country/asn filter on the origin; since/until are RFC 3339 on the start; evidence=1 adds each sanction's convicting lines (what the agent kept: 20 lines of 1 KiB at most). Each sanction carries country, asn, as_name when geolocation is configured. The fleet's copies — a sanction applied on a machine because a pack-mate decided it, rule fleet:<origin>/<rule> — are left out unless copies=include (beside the decisions) or copies=only; the facets and series follow the same switch |
GET /v1/sanctions/facets?…&n=&hits=1 |
under the same filters, the top countries, networks, rules and usernames ({countries: [{key, n}], ases: [{key, label, n}], rules, users}, n ≤ 300); with hits=1 the offenders being counted (/v1/watched, the same filters) are tallied in — h on each row, rows sorted by n + h, hits the number of them — one answer to render a panel from. A window longer than two days under the rules alone (rules=, exclude=, state=bans) is summed from daily counters kept at ingestion, the edge days scanned: exact, in milliseconds; scan=1 forces the scans instead, to compare. Over such a window the hits tallied are the ones counted now, and hits_now: true says so. expired=past (or recorded_past, or both comma-separated) counts the same selection in those states apart, as p on each row: with state=bans, every ban triggered and how many of them have expired |
GET /v1/me/prefs, PUT /v1/me/prefs |
the person's own Web UI settings — saved views, theme, display (time zone, ban colour, the feed’s cadence and rows, the side panel) — kept with the account (a token has none); PUT writes only the keys sent |
GET /v1/geoip |
what geolocation runs (databases, built date, source, the attribution due; with DB-IP: the edition held, when it was fetched, how the lists follow it) |
PATCH /v1/geoip |
`{city: true |
POST /v1/geoip/refresh |
fetch the month's DB-IP editions now and re-resolve the lists against them (the operator's own files do not refresh here) |
POST /v1/agents/{host}/resync |
the machine sends its whole history again from its next sync, evidence included, a thousand a time — a machine enrolled again does so on its own |
POST /v1/agents/{host}/revoke |
ends the agent's credential: its syncs are refused, and a new enrolment under that hostname is allowed at once (otherwise an enrolment under the name of an agent seen in the last two minutes is refused with 409 — a join token alone must not take a live machine's place) |
GET /v1/lists, GET /v1/lists/{name} |
the lists (lists/asn, country, prefixes), its block and allow scopes ({fleet: true}, or any of {agents: [...]}, {packs: [...]} — the machines running those packs — and {groups: [...]} — the machines in those groups or below them, resolved against the declarations as they stand), duration, and where its block stands — entries resolved, orders placed, error when it cannot apply; one list adds a sample of its prefixes |
GET /v1/lists/traffic?since=24h |
the packets each list's drop rules refused over the window (an hour to 400 days, counted by the hour): {since, lists: {<name>: {packets, servers: {<machine>: packets}}}} — from what each agent counts per list (list_packets in its report); an owner sees its own servers only |
blocks on a list (POST, PATCH /v1/lists/{name}, and in what GET returns) |
the firewall presets whose ports the block closes — ["web", "mail"]; [] or ["all"]: every port (absent from the answer) |
GET /v1/abuseipdb/blocklist, PUT /v1/abuseipdb/blocklist {on?, confidence?, limit?, refresh?} |
the AbuseIPDB blacklist as a preventive block (lists/abuseipdb.yaml): key_set, on, the settings as written (0 and "": left empty, the plan's best), effective (what they come to now), plan (known, fetches a day, max_entries, any_confidence) and plan_from (blacklist, bulk reports, reports or checks: the answers it was read from), min_refresh, fetches_left today, entries, fetched_at, changed_at, next_at, retry_at, took, error. The PUT refuses what the plan does not give (409 without a key); turned on or changed, the list is fetched at once. Read and written with the lists permission |
POST /v1/lists {name?, description?, asn | country | prefixes | offenders, offenders?, block?, allow?, duration?} |
create a list (offenders {within, addresses, share} with asn: the network's offending prefixes — the ones its page lists — kept up to date; without asn, every network's, narrowed by countries/except_countries (the banned addresses') and asns/except_asns; several lists may judge one network; POST /v1/lists/preview {asn?, offenders} resolves them now — count prefixes, networks, attackers banned over the window, covered inside them, blocked_addresses, and every prefix (up to 5 000) with its attackers, share and, for a global list, asn/as_name) (the name defaults to as<n> / the country code / offenders); POST /v1/lists/preview {asn | country | prefixes} resolves a subject first — prefix count, addresses, a sample, the suggested name. GET /v1/lists/{name} of an offenders list adds parts (the prefixes standing: since, attackers, share, asn, reported_at) and past (the last hundred that left, with until) |
PATCH /v1/lists/{name} {description?, block?, allow?, duration?, prefixes?, notes?, members?, trusted_everywhere?, trusted_wide?, offenders?} (?block=none, ?allow=none to clear a role), DELETE /v1/lists/{name} |
edit or remove a list; the blocks follow within seconds. notes gives each prefix a note (kept as the comment at the end of its line in the file); members names machines (fleet, group:<path>, host:<name>) whose addresses the list holds; trusted_everywhere makes every server's firewall accept the list on every port (trusted_wide for a prefix wider than /16 or /48) |
GET /v1/relaxed |
the relaxed list (relaxed.yaml): max_ban, the entries (origin, kind country/asn/range, the network's name, the country, note, by, added), a line per rule that bans (rule, its threshold and ban, and where it judges the list apart: from list or file, relaxed_threshold, relaxed_ban), the policies to choose from. Admin only |
POST /v1/relaxed/entries {origin, note?}, DELETE /v1/relaxed/entries?origin=, PUT /v1/relaxed/max_ban {max_ban} |
an origin in or out of the list (a country, an AS, a range, an address; who and when are kept), and the list's ceiling ("" removes it). ?preview=1 answers the file before and after |
POST /v1/relaxed/rules {rules, threshold?, ban?, remove?} |
gives the rules named a relaxed block from the list (a threshold, a policy, or both), or with remove takes the list's block off them — a block in a rule's own file stays |
GET /v1/lists/addresses, POST /v1/lists/addresses/approve {agents?} |
the machines the lists name, with their addresses: declared (their declaration's addresses:, counted at once), approved, reported by their agent, added (reported, waiting for approval) and gone; approving makes what these machines (all, without agents) report now the addresses the lists use — the one way a reported address enters a list |
GET /v1/stats?days=30&top=50 |
bans by country, asn, rule, agent over the window: key, label, total, one figure a day (from the daily tallies kept at ingestion; memoised a minute) |
POST /v1/fleet/repair |
audit the fleet's sharing: for every machine that enforces it, the running shared sanctions it holds no copy of — lost on the way, or short because a longer end at the origin never followed — are sent again at its next syncs, each once (a lift on that machine stands); runs apart, the answer says it started, the count per machine goes to the log and the audit trail (fleet-repair); one at a time. A longer end at the origin is sent again on its own, without asking |
GET /v1/fleet |
the fleet's figures in one: banned_addresses (distinct addresses banned right now, each counted once however many machines apply its ban), banned_sanctions (the sum over the machines), servers, list_blocks (distinct prefixes the lists block), exempted (addresses and ranges never sanctioned: files, sources, lists) |
GET /v1/sanctions/{id} |
one sanction by its fleet sequence, lines included, and facts: what its lines named, by field (the first value of each) |
GET /v1/offenders/{address} |
banned where, by which rule, since when, until when — the whole history, lines included. For an owner, a lift the operator made reads by: operator without its reason (lifted_by on sanction rows too); its own lifts and the visitor's keep theirs |
GET /v1/reputation/{address}?cached=1|fresh=1 |
what AbuseIPDB says about the address: cached=1 reads what is held and never asks; fresh=1 asks the provider now (one of the account's daily checks, recorded in the activity log as reputation-check with its outcome); neither: asks unless an answer younger than a day is held. {reputation, checks_left, checks_limit, enabled}; 404 without a key, 429 when the day's checks are spent |
POST /v1/lifts {value, agent?, reason?, withdraw_report?} |
lift wherever active, or on one machine; the agent applies it within seconds. withdraw_report asks the machine to withdraw what it reported about the address (AbuseIPDB clear-address: every report of the account about it); an owner's reaches its machine's agent too, the controller's own reports staying the administrator's |
POST /v1/networks/{asn}/lift {reason?, withdraw_report?, dry_run?} |
lift every ban one network's addresses hold, on every server (admins). dry_run only counts them (addresses); otherwise answers lifted, refused, and more when a pass of 5,000 did not reach them all. Recorded in the activity log |
POST /v1/exemptions {ip|range, for?, note?, lift?, withdraw_report?} |
written to exemptions-cli.yaml, pushed everywhere; lift also lifts the bans in force wherever they are |
GET /v1/sanctions/series?…&window=24h&step=30m&since=… |
under the same filters, counts per step over the window (bans and detections apart) — the Web UI's chart. since (RFC 3339, inside the window) answers the tail alone, on the same grid: the Web UI asks for the whole once, then the last steps every tick |
POST /v1/bans {value, agent?, duration?, reason?, report_as?, lines?} |
a ban by hand — one machine, or (no agent) the fleet: one order, applied by every machine at its next sync and by every machine enrolled later at its first, with what is left of the duration; 6h, 1y, permanent; through the usual checks (exemptions), recorded as rule manual with the reason as evidence, reported to AbuseIPDB when a preset is named. lines ([{at, raw, fields?}], 20 at most) are the detection's log lines the ban is given from: they become the sanction's evidence everywhere, and their fields are what the report says — only those the preset includes, as the rule's own report would. The Web UI fills them in and presets the rule's duration and preset. A lift without agent cancels the fleet order too |
GET /v1/bans |
the bans by hand still standing (orders not cancelled): value, agent (empty: the fleet), by, duration, reason, report preset, created — what Lists → Banned by hand shows |
GET /v1/presets |
the report presets (name, categories) |
GET /v1/reporting, PATCH /v1/reporting {key?, daily_limit?, enabled?, mode?, bulk_every_min?, bulk_max_per_day?, relay?, relay_secret?} |
the controller's AbuseIPDB reporting: relay (an https:// address; "" reports directly again) and relay_secret (32 characters or more, written to secrets.yaml, never returned: relay_secret_set says whether one is held) send the reports through a report relay, whose last answer is relay_status (url, ok, tried, at, since: failing since, detail); the key (hinted, never returned), the daily limit (auto learns the plan from the first answer; a number of your own may sit below it), the on/off switch (enabled: false keeps the key and sends nothing), who it reports for, and the day's two counts apart — what this controller sent (allowance.sent_today) and what the provider says is left on the whole account (allowance.provider_remaining, every reporter on the key counted). mode: single (a request per report) or bulk: a file leaves at once when lines_per_file reports wait, else bulk_every_min minutes after the last one (60 by default; refused below bulk_every_floor_min, the plan's shortest, or above bulk_every_max_min, 24 hours); bulk_max_per_day lowers the day's files below the plan's (0: the plan's; above it refused), a hard ceiling. plan is what AbuseIPDB's answers say of the plan (reports, files a day; 0 until said), files_left_today (-1 until a file is sent); queue (bulk mode) is what waits: waiting, more (more in the store beyond), oldest, next_at, quiet_until (no request before: the day's files spent), expired (abandoned as older than two months, all told); last_file is the last file's answer (at, lines, saved, refused, outcome, files_remaining, files_limit) |
GET /v1/reporting/relay |
{relay}: the report relay's last answer (url, ok, tried, at, since, detail), null without a relay — what the console's warning reads. Not given to owner accounts |
GET /v1/reporting/bulk-earlier, POST /v1/reporting/bulk-send {earlier?} |
bulk mode: how many bans, about, were never reported in AbuseIPDB's two months and are not waiting (about, since); and a person's "send now": what waits leaves at once, within the day's files — with earlier, those bans join the queue first. Admin only, on record |
POST /v1/reporting/bulk-trial {rule, since, until?, replayed?, limit?, after_id?, quick?, send?} |
one report file built from bans never reported — a rule's, or every rule's ("*"), in a window (since/until as a date or RFC 3339), live or replayed — shown (lines, bytes, the first lines, the rule's latest single report beside them) and, with send, sent: saved, refused with the provider's reasons, the files' allowance, the single reports' before and after (quick skips waiting for the next one). A backlog is walked with after_id = the last answer's last_id; skipped (nothing to say), too_old (past the provider's two months) and later (a second ban of an address, left for the next file) say what the file left out. A person's act — admin only |
GET /v1/firewall, GET /v1/firewall/{agent}, GET /v1/firewall/{agent}/events |
the machines' service rules (SPEC §5.13), scoped by the firewall area: what is declared (resolved, with the loader's refusal when it does not load), what the agent applied (revision, state, pending until a sync confirms it, local_off after shield fw off, the counters), the listening sockets with local/declared/refused/docker, undeclared (exposed, covered by no entry), what the test mode would have refused over 24 h (would_refuse: hits, sources, by entry), the history |
PUT /v1/firewall/{agent} {state, default, include?, services, deny, drop?} |
the whole block in one go, checked as the agent would; include the presets it follows, each a name or {name, from} (the GET gives include and include_from); drop the template's lines it leaves out (by note) and the presets' lines it leaves aside (preset:<preset>:<note>); traffic on a machine: firewall allowed, refused (packets the rules dropped — a silent drop, the field keeps its name), would (in test, would have been dropped), and what the bans and the lists dropped (banned, listed), last hour and day |
GET /v1/firewall-templates, GET|PUT|DELETE /v1/firewall-templates/{name}, POST /v1/firewall-templates/{name}/rollout, GET|POST /v1/firewall-assign {group|server, template, join, state?}, POST /v1/firewall-assign/state {group|server, state, wave?}, GET /v1/firewall-rollout?key= |
firewall templates (operator only): a composition — a mode, presets added together, lines of its own; firewall-assign gives a group (sub-groups included) or one server (an exception; "" none, group its group's again) a template, at most one each; a PUT checks the template on every server following it and keeps the revision they run; applying — a template after an edit, a group, a server — brings the servers in line one at a time, each confirming before the next, stopping at the first refusal, withdrawal or silence; firewall-assign/state switches the servers with a firewall, and gives a server without one the template it should follow, in that state (on, test); the steps live on firewall-rollout (template:<name>, group:<group>, server:<host>) |
POST /v1/firewall/{agent}/state {state: off|test|on}, POST /v1/firewall/{agent}/off, POST /v1/firewall/{agent}/entry {kind: services|deny, ports, from?, family?, note, state?}, POST /v1/firewall/{agent}/default {default, state?}, POST /v1/firewall/{agent}/presets {include, state?} |
switch the block (the declaration is patched, reloaded or put back with the loader's refusal, the agents woken; on is confirmed by the agent at its next sync or withdrawn after two cycles); the emergency off, kept in the history as such; a line added to the declaration with today's date; the mode; the presets included — an owner never names the fleet's machines (fleet, group:, host:) as sources. On a server that has a firewall, the unit edits keep its state (state switches it); on one without, state is required — on or test, refused without it ("state required: on or test — a firewall is never applied silently in test") |
GET /v1/exemptions, DELETE /v1/exemptions {value, agent?} |
every exemption in force with its origin (fleet file, source, Web UI's file, a machine's declaration, portal for a customer's own) and whether the Web UI may remove it; an owner gets its own machines' rows only, never the fleet's; remove one the Web UI wrote |
DELETE /v1/exemptions {portal} |
revokes a customer's own exemption made from a portal (administrators only); a portal row carries its id, the customer's label and the agents it covers |
POST /v1/exemptions {ip|range, all_servers: true, owner?, for?, note?, lift?, withdraw_report?}, DELETE /v1/exemptions {owner_exemption} |
an address or a range exempt on every server of an owner — those it holds now and those it is given later (each machine's bundle carries it, exemptions.d/owner.yaml). An owner credential makes and revokes its own; an administrator names the owner. lift lifts its bans on those servers, withdraw_report with it. Listed by GET /v1/exemptions as source owner, with its id (owner_exemption), the owner and the agents it covers now |
GET /v1/requests[?all=1], GET /v1/requests/count, GET /v1/requests/page?view=&period=&q=&limit=&offset=, POST /v1/requests/{id}/approve {action: lift|exempt, for?, note?}, POST /v1/requests/{id}/deny |
the Requests screen: what visitors asked on the public page and customers from a portal, pending by default. view is pending, decided, self (visitors who lifted their own ban) or portal: what customer portals did, lifts and exemptions, answered as activity — {at, action, outcome (lifted, refused, exempted, renewed, revoked), address, label, customer?, email?, by? (an operator's revocation), servers} — never counted as pending; counts gives every tab's figure. A portal's request carries its customer's machines (agents), and approving it exempts or lifts there only. A withdraw request (an owner's withdrawal of the controller's report refused because it also covers another server) is approved with action: withdraw: the controller withdraws its reports about the address |
POST /v1/reports/withdraw {value, agent?} |
withdraws what was reported to AbuseIPDB about an address, whatever its ban is doing (in force, ended, lifted) — the ban stays. A server's own report: its agent withdraws, ordered without a lift (agents); not where a ban is in force (banned: a lift with withdraw_report does both). The controller's report: the controller withdraws (controller). The provider withdraws per address and per key, every report that key made, so an owner (sanctions: write) withdraws only for its servers, and the controller's reports only when every one of them about the address was made for its servers; otherwise refused, a withdraw request goes to the operator (request) and note says so. Two machines sharing an AbuseIPDB key withdraw each other's reports: the controller cannot see their keys. Logged as report-withdrawn or report-withdraw-refused |
/v1/portal/… |
the client view, for a hosting provider's customer portal: portal tokens, the bans of the customer's sites, their own address lifted or exempted for 30 days, a lasting exemption asked, every exemption covering the customer's servers whoever made it (GET /v1/portal/exemptions: origin portal, owner, operator or declared, revocable, and with ?history=1 those ended in the last 90 days, ended expired or revoked, by you or team) — the contract is docs/CLIENT-VIEW.md |
POST /v1/exemptions {…, agent?} |
with agent: one machine's own exemption, written to its declaration |
PATCH /v1/sources {enable?, disable?, refresh?}, POST /v1/sources/custom {name, url|urls, format, note}, DELETE /v1/sources/custom/{name} |
sources on and off, the refresh interval, lists of your own — edits of controller.yaml, reloaded whole or reverted |
GET /v1/sanctions/facets?…&facet=user&facet=path |
besides countries and networks: what the convicting lines named, per capture asked for (fields.user, …); field=user:admin filters the listing by one, user= and target= by one value or several comma-separated (any of a name's values, every name matched), rules=a,b by exact rules — each list keeps its own true counts while its filter narrows the rest |
GET /v1/maintenance, POST /v1/maintenance/prune {evidence_older_than?, samples_older_than?, sanctions_older_than?}, POST /v1/maintenance/vacuum |
what the store holds and the retention that applies; flush (retention's spans by default, now for everything); compact |
GET /v1/updates |
the latest releases the forge publishes and whether this controller is behind |
GET /v1/watched?agent=&q=&value=&country=&asn=&user=&exclude=&exempt=1&detect=&evidence=0&gone=1&limit= |
the offenders the agents are counting but have not convicted (what fail2ban shows as "found"): server, rule, threshold, count of need, first/last seen, origin (country, asn, city, lat/lon with the city database — the same shape the sanctions carry), the lines so far — as of each agent's last sync, a snapshot never stored; user= and target= keep those whose lines named one of the values (comma-separated; every name given must match), rules=a,b keeps these exact rules, exclude= leaves rules out, exempt=1 shows the exempt ones too (exempt=only those alone), evidence=0 leaves the lines out, gone=1 appends the suspects that left the lists within the hour (gone_at set, gone count) — what was counted and came to nothing — and gone=only shows those alone |
GET /v1/hits?agent=&value=&rule=&country=&asn=&field=target:…&since=&until=®ime=prod|test&exempt=1&evidence=1&limit= |
the hits HISTORY over a window — the below-threshold episodes the agents reported, kept past the live snapshot (a past window reads this, a live one /v1/watched; the shape matches so both render the same way): one row per continuous presence of an address under a rule (first, last, peak count of need, targets, test, exempt with the reason, gone_at once it left), lines with evidence=1 (open episodes' lines are read live); since/until RFC 3339 select by first appearance, regime= keeps one regime's episodes, exempt= as on /v1/watched — absent hides the exempt ones, except when value= asks for one address, whose episodes always show |
?delta= on GET /v1/sanctions and GET /v1/watched |
differential sync for a live view: delta=1 answers in full and issues a delta_token; sending that token back answers only changed rows, removed keys and the full order of keys — the client rebuilds the list locally and prunes what fell out. A token answers one exact question for one credential, once, for two minutes: anything else falls back to the full answer with a fresh token |
GET /v1/networks/{asn} |
an autonomous system from the ASN database: name, every prefix, and what they add up to (ipv4_addresses, ipv6_networks as /64s); no fleet data, so an owner token with activity: read may read it too |
GET /v1/networks/{asn}/owner, PATCH /v1/networks/{asn}/owner {reporting?, format?, contact?, note?, block?} |
the network's abuse desk and reporting: contact (the address the last report used, or the operator's), setting, blocks (every block a report went to, each with its desk, source, bounce state) and desks (how many differ — a wholesale network has one per customer), the recent reports and answers. PATCH with contact sets the operator's address for the whole network (empty: the registry's again); with block (a prefix) and contact, for that block alone — which wins over the network's; reporting on/off/"" and format xarf/text/"" per network |
GET /v1/networks/{asn}/offenders |
the offenders lists blocking prefixes of the network right now — each list (own: the network's, else a global one), where it applies, and its parts inside the network with since, attackers, share, reported_at; the network's own lists holding nothing yet are listed too. What its page says beside the whole-network ban |
GET /v1/networks/{asn}/activity?since=30d&addr=, GET /v1/addresses/{addr}/network?since= |
what the network did over a window (24h, 7d, 30d, an RFC 3339 time, all): sanctions, distinct addresses, hits, bans in force, and counting_addresses/counting_hits — the addresses the servers are counting right now and have not banned (the rules' own windows plus the hour after; slow probing spread across a big network shows there) — the same per prefix of the network, plus the count of prefixes never seen (quiet_prefixes). With an address: containing (the prefix holding it) and address (its own line). The rules' own decisions only: the fleet's copies and bans of whole prefixes by hand are left out; sampled says the window held more than 200 000 sanctions. The origin and address dialogs are built on it. An owner reads its servers' share, without what the fleet's lists block (GET /v1/networks/{asn}/sanctions?p= likewise) |
| `GET /v1/sanctions/export?<the listing's filters>&format=csv | txt |
| `GET /v1/sanctions/summary?<the listing's filters>&step=auto | 1h |
| `GET /v1/networks/{asn}/report?since=48h | 7d |
GET /v1/me, PATCH /v1/me {email?, password?} |
who is asking — role admin (everything; called operator before 2026-09-03, still read) or owner (one client's scope and permissions, listed in the answer); a person changes their own password and email — an API token has neither. address_exempt says whether the address asking is exempt for good: on the whole fleet for an admin, on every one of its servers for an owner, with address_not_exempt_on naming the owner's servers where it is not; GET /v1/me/exempt?value= answers the same for the other family's address |
GET /v1/owners, POST /v1/owners {name, note?, permissions}, GET/PATCH/DELETE /v1/owners/{name}, POST/DELETE /v1/owners/{name}/resources {kind?, value}, GET /v1/permissions |
the clients (admin only): each holds machines and one permission per area — activity/logs (read), sanctions/exemptions/fleet (write), rules (read | switch | write); an account or token created with owner: holds exactly that. An owner credential reaches only the endpoints that apply its scope (default-deny); its lifts, bans and exemptions must name one of its machines and never widen |
GET /v1/config, POST /v1/config/reload, POST /v1/config/validate |
the tree, reload it, or only check it |
GET /v1/sources, POST /v1/sources/{name|all}/refresh |
published exemption sources |
POST /v1/sources/{name}/covered {on?} |
what turning a source on (or widening it to on, a scope as in PATCH /v1/sources) would lift: the bans in force it covers there — bans, agents: [{agent, bans}], more past 5 000, pending for a list not fetched yet. Admins; nothing written. PATCH /v1/sources {…, lift: true} lifts them on the machines of the source's scope only (a list never fetched: once fetched), in the background; the answer's lifting: {name: n} says how many (−1: after the fetch), the activity log (lift-source) how many and where |
GET /v1/audit?limit=&before=&who=&action=&q=&since=&until=, GET /v1/audit/facets |
the trail, newest first, a page at a time: before=<id> continues below the last line shown, who and action match exactly, q is looked for in who, target and detail, since/until (RFC 3339) bound the time; facets lists every action and every actor with counts, and the total |
POST /v1/join-tokens {uses?, expires?} |
a token for a new machine |
GET|POST /v1/tokens, DELETE /v1/tokens/{name}, DELETE /v1/tokens/{name}?purge=1 |
API tokens: revoke one, or forget a revoked or expired one for good (a live one is refused — revoke it first) |
GET|POST /v1/accounts, POST /v1/accounts/{name}/password, POST|DELETE /v1/accounts/{name}/totp, DELETE /v1/accounts/{name} |
people |
GET /v1/webhooks, PUT /v1/webhooks {webhooks: [{name, url, off?, sources?, events?, new_secret?}]} |
the webhooks (admins), below: the list, without the secrets (secret_set), and the sources and events there are. PUT replaces the list whole; a webhook keeps its secret unless new_secret, a new one gets one — answered once in secrets: {name: secret}, never readable again. sources absent: the default sources |
POST /v1/webhooks/{name}/test |
sends one test event now, signed, and answers how the receiver took it: delivered, status, ms, error |
Roles: every token today is an operator's; owner-scoped tokens come with the owner model. Refused tokens are rate-limited per address.
Webhooks
The controller can tell another program, as it happens, that a ban was
lifted: it POSTs a JSON event to each webhook configured (Settings →
General → Webhooks, or webhooks: in controller.yaml), signed with
that webhook's own secret.
Which lifts
Every lift that lets an address back in is an event, and each says its
source:
| Source | The lift | Sent by default |
|---|---|---|
public |
the visitor, from the public unblock page | yes |
portal |
a customer portal, through a portal token (the visitor's own address, or a ban of the customer's sites) | yes |
request |
a request from the public page, approved in the Web UI | yes |
whitelist |
a whitelist request granted automatically | yes |
manual |
a lift by an operator or an API token: one address, a rule's bans, a network's | no |
exemption |
an exemption written with its lift | no |
Each webhook has its own list of sources (sources:), and so has the
mail (public.notify_unblock_sources). An action that lifts many
addresses at once — a rule's bans, a network's, an exemption of a whole
AS — is one event listing them, never one per address. A lift that
found nothing in force sends nothing.
The event
{
"event": "unblock",
"at": "2026-11-20T09:14:03Z",
"source": "portal",
"client": "Example Hosting",
"reason": "the visitor's own address",
"addresses": [
{
"address": "192.0.2.10",
"servers": ["web1", "web2"],
"causes": [
{"rule": "wp-login", "servers": ["web1"], "copies": ["web2"],
"since": "2026-11-20T08:02:11Z", "until": "2026-11-20T14:02:11Z"}
]
}
]
}
clientis who asked: the visitor's address (public,whitelist), the portal token's label (portal), the account or API token (request,manual,exemption).email: the address a visitor gave on the public page, when they gave one.scope: what a grouped lift was about (the bans of rule wp-login,the bans of AS64500,an exemption of AS64500).reason: what the lift was recorded with.addresses: each address let in (an IPv6 ban is a/64), the servers that held it, and what had banned it — each rule, the servers where it was decided, the servers that applied it from there (copies), since and until when. At most 500 addresses;morecounts the rest.
A test event ({"event": "test", "at", "by"}) is sent by the test
button and POST /v1/webhooks/{name}/test.
The request
POST <url>
Content-Type: application/json
User-Agent: Shieldlist-Controller
X-Shieldlist-Event: unblock
X-Shieldlist-Delivery: 5f1c0a3e9b2d4c7e8a6f0b1d
X-Shieldlist-Timestamp: 1763630043
X-Shieldlist-Signature: sha256=3b6e…
X-Shieldlist-Signatureissha256=followed by the hex HMAC-SHA256, keyed with the webhook's secret, of the timestamp, a dot, and the body exactly as received:<timestamp>.<body>.X-Shieldlist-Deliveryidentifies the event: the same on every attempt, so a receiver that saw it already can ignore it.- Any 2xx answer is a delivery. Anything else, or no answer within 10
seconds, is tried again after 30 seconds, 5 minutes and 30 minutes,
then given up. A redirect is not followed. Every attempt is in the
activity log (
webhook-delivered,webhook-failed) and in the controller's log. Deliveries waiting for a retry do not survive a restart of the controller.
Checking the signature
Check, in this order: the signature over the raw body (before any JSON parsing), compared in constant time; the timestamp, refused when it is more than five minutes from your clock (a captured request replayed later fails here); the delivery id, refused when already seen.
PHP:
$body = file_get_contents('php://input');
$ts = $_SERVER['HTTP_X_SHIELDLIST_TIMESTAMP'] ?? '';
$sig = $_SERVER['HTTP_X_SHIELDLIST_SIGNATURE'] ?? '';
$want = 'sha256=' . hash_hmac('sha256', $ts . '.' . $body, $secret);
if (!hash_equals($want, $sig) || abs(time() - (int) $ts) > 300) {
http_response_code(401);
exit;
}
$event = json_decode($body, true);
Python:
import hashlib, hmac, time
def verified(secret: bytes, body: bytes, ts: str, sig: str) -> bool:
want = "sha256=" + hmac.new(secret, ts.encode() + b"." + body, hashlib.sha256).hexdigest()
return hmac.compare_digest(want, sig) and abs(time.time() - int(ts)) <= 300
Configuration
webhooks:
- name: crm
url: https://hooks.example.com/shieldlist
secret: "whsec_…" # 16 characters at least; the Web UI makes one
sources: [portal, request] # absent: public, portal, request, whitelist
# off: true # kept, sent nothing
The secret lives in controller.yaml with the other secrets; the Web UI
and the API never read it back.
shield as the client
export SHIELD_CONTROLLER=https://shield.example.net SHIELD_TOKEN=…
shield agents | agent HOST | set HOST key=value… | bans | why ADDR
shield unban ADDR [-agent HOST] [-reason WHY] [-withdraw-report] | exempt ADDR [-for 30d] [-note WHY] [-lift [-withdraw-report]]
shield rules | rule NAME key=value… | reload | validate | audit | token | sources | refresh NAME
shield ban ADDR [-agent H] [-for 30d] | exemptions | unexempt ADDR | hits | watched
shield lists | list NAME [refresh|delete] | requests | request ID approve|deny | reports | report ID [handled]
shield owners | owner … | accounts | account … | api-tokens | api-token … | join-tokens
shield me | vitals | stats | config | maintenance | prune | vacuum | repair | updates | geoip
shield settings [AREA [key=value…]] | file PATH [-put [-validate]] | packs | parsers | policies | presets | templates
shield network ASN [reporting=on|off] [format=xarf|text] [contact=ADDR] [include.PART=on|off]
shield -json <verb> # the answer as it came, for a script
Same binary as on the machines; without -controller it reads the
local agent. See the agent wiki's
Commands.