Overview

Conventions, authentication, and base URLs for the Flux REST API.

The Flux server exposes a FastAPI application. Every public route is documented in this section, organized by domain: workflows, executions, workers, schedules, secrets, and auth/admin.

Base URL

A locally-started server (flux start server) listens on http://localhost:8000 by default. In production the server typically sits behind a reverse proxy that terminates TLS and exposes the API at a public hostname. The REST API has no global version prefix in Flux 0.56.0 — paths begin at /workflows, /executions, /admin/..., and so on.

Authentication

Flux uses a bearer-token model. Authenticated callers send:

Authorization: Bearer <token>

Two production providers are always available when [flux.security.auth].enabled = true:

Two internal providers are always registered but not intended for direct use:

For provider configuration and key lifecycle, see Security: Authentication.

When auth is disabled

If [flux.security.auth].enabled = false, every route accepts unauthenticated requests as an anonymous identity with no permissions resolved. Most routes still call require_permission(...), which returns success when auth is disabled. This mode is intended for local development only.

Permissions

Most routes are gated by require_permission("<permission>"). Permissions follow the shape resource:scope:scope:verb, with * as a wildcard. Common shapes:

A 403 response carries {"detail": "Permission denied: requires '<perm>'"} (or, for workflow run, a structured body with missing_permissions).

Request and response format

HTTP method conventions

Flux mostly follows REST conventions, with one deliberate exception:

SSE endpoints

Three endpoints return Server-Sent Events with media_type: text/event-stream:

Worker health and metrics

Workers answer the SSE ping with POST /workers/{name}/pong, whose optional JSON body is {"healthy": bool, "metrics": {str: float}} (legacy workers send no body). A worker reporting healthy: false stays connected — running work finishes — but is excluded from new dispatch until it reports healthy again. GET /workers reflects both signals: each worker carries its latest advertised metrics snapshot, and status can be unhealthy in addition to online/offline. The metrics feed dynamic routing policies.

Versioning

The API itself has no version prefix in Flux 0.56.0. Workflow versioning happens at the catalog level: registering a workflow with the same namespace/name allocates a new integer version. Run a specific version with ?version=<n> on POST .../run/{mode}.

Rate limits

Flux 0.56.0 bakes in two narrow application-level rate limits: POST /auth/test-token is limited to 10 requests per minute per client, and POST /workers/register defaults to 30 requests per minute per client IP (tunable via [flux.workers] register_rate_limit; an empty string disables it). For everything else, rely on your reverse proxy or API gateway.

Health and metrics

OpenAPI

The FastAPI app exposes OpenAPI documents and Swagger UI automatically:

See OpenAPI spec for code-generation tips.