Skip to content

Router named IP lists

One global IPv4 catalogue serves every router in the installation. This page covers the release that ships /api/v1/ip-lists; older releases do not expose this API. Lists are independent entities, referenced as @name in Global ACL. Existing ID references still work.

Use the installation HTTPS origin and its human session cookie. Reads need read on every configured router. Creating, editing, deleting and immediate fetching need candidate_write on every router. Initial activation and source configuration changes go through the existing traffic Apply endpoint, which requires apply_critical and recent authentication. Automatic refresh is a system action, and it only touches HTTP sources that were already applied. It will not apply unrelated manual drafts.

The mutation fields shown below are required, except comment and source.max_prefixes for manual sources. expected_revision is the shared traffic workspace revision; take it from the latest response. PUT creates or replaces the list at the path ID. IDs accept 1–128 ASCII letters, digits, dots, underscores and hyphens. Names use the same characters, capped at 64 bytes. Names and IDs must never make a reference ambiguous. prefixes holds canonical IPv4 CIDRs, so a single address is written as /32. Manual lists reject duplicate prefixes. The ceiling is 1024 lists and 8192 stored prefixes in total. Every response carries the complete catalogue. There is no pagination.

The catalogue returns comment as plain text. PUT accepts up to 1024 Unicode characters. An omitted or null comment keeps the existing value (empty for a new list); an empty string clears it. Manual sources take max_prefixes from 1 to 8192 and default to 8192 when it is omitted. Exceeding that limit rejects the whole save. The 8192 total across all lists still applies. Comments and source limits live in controller metadata only: dataplane lists carry just IDs, names and prefixes. The list card shows saved policy references with WL/BL labels, rule references and ACL line numbers. Saving the card updates the catalogue. Applying the complete saved traffic configuration is a separate step.

HTTP sources take a public HTTP or HTTPS URL on port 80 or 443, with no user information, query parameters or fragments. The server resolves and pins public IPv4 addresses, disables proxies and redirects, checks HTTPS certificates, and enforces a 10-second timeout and a 1 MiB body limit. The text format is one IPv4 address or canonical CIDR per line. Blank lines and # comments are accepted, and duplicates are removed. A single invalid entry or an exceeded limit rejects the whole download, and the last valid contents stay in place. An explicitly empty valid feed is accepted. Intervals run from 60 to 604800 seconds; a source limit is 1–8192 prefixes. The scheduler checks for due sources every 15 seconds, so processing and retry delays can stretch the interval.

For HTTP sources, PUT must send an empty prefixes array. Keeping the URL retains the last valid contents; changing it clears the cached content and validators. Each fetch records last_attempt_epoch_seconds, last_success_epoch_seconds and error. Times are UTC Unix seconds, or null when absent. ETag and Last-Modified enable conditional requests, and content_hash exposes a normalized SHA-256 content hash. An HTTP 304 or unchanged contents leave the configuration revision alone and do not deliver another configuration.

GET /api/v1/ip-lists
PUT /api/v1/ip-lists/list-one
Content-Type: application/json
{"expected_revision":0,"name":"iplist","comment":"Example list","prefixes":["192.0.2.0/24"],"source":{"type":"manual","max_prefixes":4096}}
{
"schema_version": 1,
"scope": "global",
"family": "ipv4",
"revision": 1,
"nodes": ["router-a", "router-b"],
"max_total_prefixes": 8192,
"pending_operation": false,
"lists": [{
"id": "list-one", "name": "iplist", "comment": "Example list", "prefixes": ["192.0.2.0/24"],
"source": {"type": "manual", "max_prefixes": 4096},
"last_attempt_epoch_seconds": null, "last_success_epoch_seconds": null,
"error": null, "http_etag": null, "http_last_modified": null, "content_hash": null,
"usage": {"acl_lines": [], "rules": [], "policies": []}, "auto_update": false
}]
}
// Run in an authenticated browser on the installation origin.
async function request(path, method = 'GET', body) {
const response = await fetch(path, {
method, credentials: 'same-origin',
headers: { 'Content-Type': 'application/json' },
...(body === undefined ? {} : { body: JSON.stringify(body) })
});
const data = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${data.error}`);
return data;
}
let catalogue = await request('/api/v1/ip-lists');
catalogue = await request('/api/v1/ip-lists/feed-one', 'PUT', {
expected_revision: catalogue.revision, name: 'blocked_sources', comment: 'Example feed', prefixes: [],
source: { type: 'http', url: 'https://feeds.example.net/ipv4.txt',
refresh_interval_seconds: 600, max_prefixes: 4096 }
});
catalogue = await request('/api/v1/ip-lists/feed-one/refresh', 'POST', {
expected_revision: catalogue.revision
});
const feed = catalogue.lists.find(list => list.id === 'feed-one');
if (feed.error || feed.last_success_epoch_seconds === null) {
throw new Error(feed.error || 'No valid feed snapshot');
}
// Review and save the desired ACL containing: DROP src @blocked_sources
// Then read its exact revision before applying the saved traffic configuration.
const workspace = await request('/api/v1/traffic/workspace');
const applied = await request('/api/v1/traffic/apply', 'POST', {
expected_revision: workspace.revision
});
if (applied.pending_operation) throw new Error('Delivery requires reconciliation');
// Deletion example for a different, unreferenced list.
const latest = await request('/api/v1/ip-lists');
await request('/api/v1/ip-lists/list-one', 'DELETE', {
expected_revision: latest.revision
});

Once a source and its rule references have been explicitly applied, new downloaded contents update the applied rules on all configured routers automatically. auto_update reports whether the current source settings were applied. Only referenced lists are delivered automatically. Changing the URL, interval or limit needs another explicit Apply. A referenced HTTP list cannot be applied until its first successful fetch.

A successful fetch does not confirm delivery. Check the traffic workspace apply_status for each router, and check pending_operation. Partial delivery keeps the exact operation and retries it after a restart. A new manual draft never takes its place.

Deleting a referenced list is rejected, and so is renaming a list mentioned in Global ACL, even when the ACL reference is disabled. Managed lists cannot be replaced through the legacy traffic workspace PUT. An HTTP fetch failure returns 200 with the retained catalogue and an error on the list, so check that field. Other errors use the existing API error body: 401 for a missing or invalid session, 403 for insufficient scope or rights, 428 when Apply requires recent authentication, 409 for revision conflicts or unresolved delivery, 422 for invalid lists or references, and 500 for unavailable or incompatible persistence. Malformed JSON may get the framework’s 400 or 422 response. Do not automatically repeat a configuration write after an uncertain response. Reread its revision and content first.