Product

Product Features How to Compare Docs Screenshots Why

Start here

Getting started Download Guides Frequently asked questions

More

Security Support Roadmap About

Visibility

The JSON API

The web pages are one client of the API rather than a separate implementation. That means anything you can do by clicking, you can do from a script, and it will be recorded the same way.

Authentication and roles

API calls use the same accounts and the same three roles as the GUI. A viewer token cannot write. An operator token cannot manage users. Every write is recorded in the audit log with the account that made it, exactly as a click would be.

What people use it for

  • Driving a blocklist from something else, by pushing key value pairs into a map.
  • Adding and removing pool members as part of a deployment, then applying.
  • Draining a backend before a release and putting it back afterwards.
  • Reading health and utilization into whatever you already use for monitoring.
  • Exporting the audit log into a log analysis system.

Writes still need an apply

This trips people up the first time. A write over the API saves, exactly like a save in the GUI. It does not go live until an apply, which is also an API call. That is deliberate: a script that changes five things should apply once at the end, not five times, and it should be able to check what it is about to do first.

Tokens and the browser

Browser sessions carry a CSRF token, and a write with no token or a forged one is refused. There is a check in the test suite for exactly that. If you are writing a client, use a token rather than trying to reuse a browser session.

Reload rate is the real limit

Do not drive it like a message queue

Everything here ends in a config render and an nginx reload. Reloads are graceful and debounced, so bursts are fine. If your script wants to change backends many times a minute, forever, the reload rate becomes the limit, and that is a design problem rather than a tuning problem.

Common questions

Is there an OpenAPI description?

The routes are defined in the application and the GUI uses them directly. Read the routes files in the source for the current shape, since that is the version that is actually true.

Can I use it from the standby node?

Reads yes, writes no. Writes go to the active node, the same as in the GUI.

Does it work while the cluster is split?

A node that cannot see a majority will not take writes, on purpose.

Step by step instructions

The how to section has searchable, task shaped answers. Search it for api.

Related features

Two fresh servers is all it takes

Ubuntu 22.04 or newer, root access, and about twenty minutes. The installer does the rest and it is safe to run twice.