Every change to a zone's configuration (records, edge settings, rules) creates a new numbered version with its author and reason. Versions can be compared and restored, and the propagation endpoint shows which version each edge node has applied. See Configuration changes.
Lists the configuration versions of a zone, newest first, without their snapshots. It also works for a deleted zone, whose last version is zone.delete; the ETag is then its final version.
import { OpenWAF } from"./openwaf";
const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKENconst result = await owf.listZoneVersions({
zone: "6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d",
limit: 20
});
from openwaf import OpenWAF
owf = OpenWAF(base_url="https://dash.openwaf.dev") # token from OPENWAF_TOKEN
result = owf.list_zone_versions(zone="6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d", limit=20)
import { OpenWAF } from"./openwaf";
const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKENconst result = await owf.getZoneVersion({
zone: "6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d",
version: 11
});
from openwaf import OpenWAF
owf = OpenWAF(base_url="https://dash.openwaf.dev") # token from OPENWAF_TOKEN
result = owf.get_zone_version(zone="6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d", version=11)
Restores the configuration (records, edge settings and rules) of to_version as a new version; changes made after it are undone. If-Match is required. If some site of the restored version would be left without a valid certificate, the answer is 409 missing_certs with the hostnames, unless allow_missing_certs is true.
Reason of the change: 1-500 UTF-8 characters after trimming spaces, no control characters. If it is missing or invalid: 422 reason_required. 1 to 500 characters.
If-Match
header
string
Yes
Expected configuration version, e.g. "12". Required (428 if_match_required); if it is not the current one: 412 version_conflict.
dry_run
query
string
No
1/true simulates the change: answers 200 with the plan (Applied) and saves nothing. 0/false accepted; any other value: 400. One of 1, true, 0, false.
curl-X POST "https://dash.openwaf.dev/v1/orgs/$OPENWAF_ORG/zones/6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d/revert" \
-H"Authorization: Bearer $OPENWAF_TOKEN" \
-H"X-Change-Reason: Undo the last change" \
-H'If-Match: "12"' \
-H"Content-Type: application/json" \
--data '{
"to_version": 11
}'
import { OpenWAF } from"./openwaf";
const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKENconst result = await owf.revertZone({
zone: "6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d",
body: {
to_version: 11
}
}, {
reason: "Undo the last change",
ifMatch: 12
});
from openwaf import OpenWAF
owf = OpenWAF(base_url="https://dash.openwaf.dev") # token from OPENWAF_TOKEN
result = owf.revert_zone(
zone="6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d",
body={
"to_version": 11
},
reason="Undo the last change",
if_match=12,
)
Shows which configuration version each edge node serving the zone has applied, against the desired (current) version in the ETag. Nodes that are leaving the zone appear with status retiring until they apply a configuration without it.
import { OpenWAF } from"./openwaf";
const owf = new OpenWAF({ baseUrl: "https://dash.openwaf.dev" }); // token from OPENWAF_TOKENconst result = await owf.getZonePropagation({
zone: "6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d"
});
from openwaf import OpenWAF
owf = OpenWAF(base_url="https://dash.openwaf.dev") # token from OPENWAF_TOKEN
result = owf.get_zone_propagation(zone="6f1d2c3b-8a4e-4b7d-9c21-5e3f7a8b9c0d")