SDKs

Typed TypeScript and Python clients for the OpenWAF API, generated from its OpenAPI contract, one file each, with no dependencies.

OpenWAF has two official API clients, generated from the same OpenAPI contract as the API reference:

SDKFileRuns onDependencies
TypeScript / JavaScriptopenwaf.tsBun, Deno, Node.js with TypeScript type stripping, browsers and any TypeScript toolchain; built on fetchNone
Pythonopenwaf.pyPython 3.8 or laterNone (standard library)

Each SDK is a single file that you download from the API itself and keep in your project. It has one method per API operation that an API token can call, with typed parameters and answers, and the same change protocol as the dashboard and the CLI: a reason on every write, simulation with a dry run, and the expected version.

import { OpenWAF } from "./openwaf.ts";

const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKEN
const { items = [] } = await owf.listZones();
for (const z of items) console.log(z.name, z.status, z.config_version);

Last updated:

↑↓ to navigate↵ to openesc to close