RIPE Updater exposes a small HTTP API built on Flask. Most operators only interact with two endpoints:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jalmargyyk/ripe-updater/llms.txt
Use this file to discover all available pages before exploring further.
/health for readiness probes and /update to receive NetBox webhook events. The /backups and /backup/<name> endpoints are available when S3 backup storage is enabled and give you a quick way to browse and retrieve stored RIPE object snapshots without leaving your browser.
GET /health
Returns the stringOk with HTTP 200 whenever the Flask process is running and accepting connections. No authentication is required.
Use cases
- Load balancer readiness and liveness probes
- Uptime monitors and alerting systems
- Confirming the container started correctly after deployment
POST /update
The primary webhook receiver. NetBox calls this endpoint whenever a prefix is created, updated, or deleted. RIPE Updater validates the payload, looks up additional data from NetBox, builds a RIPE INETNUM or INET6NUM object from your templates, and pushes the change to the RIPE database.Authentication
WhenUPDATE_TOKEN is set, every request must include the Authorisation header (British spelling) containing the configured token value. Requests that omit the header or supply a wrong value are rejected with 401. When UPDATE_TOKEN is not set, no token check is performed and all requests are accepted.
Request
- Content-Type:
application/json - Body: NetBox webhook JSON payload
Body parameters
The NetBox object type. Must be
"prefix". Any other value returns 400.The webhook event type. Accepted values are
"created", "updated", and "deleted".The IP prefix in CIDR notation, for example
"192.0.2.0/24" or "2001:db8::/32".Controls whether this prefix should be synchronised to the RIPE database. When
false (or absent), RIPE Updater deletes the corresponding RIPE object. When true, it creates or updates it.The template name to use when building the RIPE object. Required when
ripe_report is true. Must match a key in your templates.json file (case-insensitive; stored uppercased internally). Omitting this when ripe_report is true returns 400.The NetBox site slug for the prefix. Used to look up the site’s parent region and derive the ISO 3166 country code for the RIPE object. If absent or the region cannot be resolved,
DEFAULT_COUNTRY is used as a fallback.The NetBox username who triggered the webhook. Included in email reports when
MAIL_REPORT=yes. Defaults to "None" if not present.Example payload
Response codes
| Code | Meaning |
|---|---|
204 | Success. The RIPE database operation completed and no body is returned. |
400 | Invalid payload — missing required fields, wrong model value, or non-JSON body. |
401 | Missing or incorrect Authorisation header. |
500 | The RIPE database operation failed (e.g. a BadRequest or RipeDBError was raised). |
Two additional responses return HTTP
200 rather than an error, because the skip is intentional: NotRoutedNetwork, skipping request when the prefix is RFC1918, loopback, link-local, multicast, or otherwise non-routable; and ErrorSmallPrefix, skipping request when the prefix length exceeds SMALLEST_PREFIX_V4 or SMALLEST_PREFIX_V6.Example request
GET /backups
Returns an HTML page listing all RIPE object backup files stored in S3. No authentication is required. The page is rendered from thebackups.html template and shows the filename of every object stored in the configured S3 bucket. Each entry links to GET /backup/<name> so you can retrieve the raw JSON.
This endpoint returns an empty list when
S3_BACKUP is not set to yes. Configure S3_ENDPOINT_URL, S3_ACCESS_KEY, S3_SECRET_ACCESS_KEY, and S3_BUCKET before enabling backups.GET /backup/<name>
Returns the raw JSON content of a single backup file from S3. No authentication is required.Path parameter
The filename of the backup object as it appears in the
/backups listing. Filenames follow the pattern prefix_<cidr-with-slashes-replaced-by-underscores>.json, for example prefix_203.0.113.0_24.json.curl to restore the object to the RIPE database:
When
S3_BACKUP=no, GET /backup/<name> returns an empty body regardless of the filename supplied.