OPNexusdocs

API: rule-cleanup

GET /api/hosts/{host_id}/rule-cleanup#

List Operations

The newest operations of this host (and its cluster peers) with their items; unexpired previews included.

Berechtigung policy.read (ansehen)

Parameter

host_id *pathstring (uuid)
limitqueryinteger

Antwort 200 CleanupOperationRead[]

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

GET /api/hosts/{host_id}/rule-cleanup/{op_id}#

Get Operation

Berechtigung policy.read (ansehen)

Parameter

host_id *pathstring (uuid)
op_id *pathstring (uuid)

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/{op_id}/cancel#

Cancel

Drop an unused preview (only its own actor can).

Berechtigung policy.write (vorbereiten)

Parameter

host_id *pathstring (uuid)
op_id *pathstring (uuid)

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/{op_id}/confirm#

Confirm

"I still have access": re-reads every node first. Browser session only, never with an API token.

Berechtigung policy.write (vorbereiten) · nur Browser-Sitzung, kein API-Token

Parameter

host_id *pathstring (uuid)
op_id *pathstring (uuid)

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/{op_id}/deploy#

Deploy

Execute a preview. Admin only; the live state must still give the fingerprint of the preview.

Berechtigung policy.cleanup (verwalten)

Parameter

host_id *pathstring (uuid)
op_id *pathstring (uuid)

Anfrage-Body ConfirmName

1 Felder anzeigen
FeldTypHinweise
confirm_name *stringmaxLength 255

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/{op_id}/retry#

Retry

Revert again after revert_failed, or read the firewall again for a delete/restore with an unclear item.

Berechtigung policy.cleanup (verwalten)

Parameter

host_id *pathstring (uuid)
op_id *pathstring (uuid)

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/{op_id}/revert#

Revert

Take the change back now (the same code the sweeper runs when the window passes).

Berechtigung policy.deploy (ausrollen)

Parameter

host_id *pathstring (uuid)
op_id *pathstring (uuid)

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/items/{item_id}/restore#

Restore

Bring a deleted rule back, switched OFF, at its old position (a new UUID). The result is the restore run; ``warnings`` can hold BEREINIGUNG_POSITION_NICHT_WIEDERHERSTELLBAR.

Berechtigung policy.cleanup (verwalten)

Parameter

host_id *pathstring (uuid)
item_id *pathstring (uuid)

Anfrage-Body ConfirmName

1 Felder anzeigen
FeldTypHinweise
confirm_name *stringmaxLength 255

Antwort 200 CleanupOperationRead

22 Felder anzeigen
FeldTypHinweise
actor *string
can_confirmboolean default: false
can_retryboolean default: false
can_revertboolean default: false
cluster_namestring | null
confirmed_atstring | null
created_atstring | null
expires_atstring | null
finished_atstring | null
heartbeat_atstring | null
host_id *string
host_namestring | null
id *string
itemsCleanupItemRead[]
kind *string
messagestring | null
optionsmap<string, any>
planmap<string, any> | null
revert_deadlinestring | null
started_atstring | null
status *string
warningsstring[]

POST /api/hosts/{host_id}/rule-cleanup/preview#

Preview

Recompute the plan from the live firewall(s) and store a 5-minute preview bound to the caller.

Berechtigung policy.write (vorbereiten)

Parameter

host_id *pathstring (uuid)

Anfrage-Body PreviewRequest

6 Felder anzeigen
FeldTypHinweise
ack_text_versionstring | null
acknowledgestring[]
itemsPreviewItem[]
kind"disable" | "enable" | "delete" | null
unused_daysinteger | null
uuidsstring[]

Antwort 200 CleanupPreviewRead

7 Felder anzeigen
FeldTypHinweise
expires_atstring | null
kind *string
max_rules *integer
operation *CleanupOperationRead
plan *map<string, any>
preview_id *string
window_seconds *integer