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.

Permission policy.read (look)

Parameters

host_id *pathstring (uuid)
limitqueryinteger

Response 200 CleanupOperationRead[]

Show 22 fields
FieldTypeNotes
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

Permission policy.read (look)

Parameters

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

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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).

Permission policy.write (prepare)

Parameters

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

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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.

Permission policy.write (prepare) · browser session only, no API token

Parameters

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

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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.

Permission policy.cleanup (administer)

Parameters

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

Request body ConfirmName

Show 1 fields
FieldTypeNotes
confirm_name *stringmaxLength 255

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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.

Permission policy.cleanup (administer)

Parameters

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

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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).

Permission policy.deploy (roll out)

Parameters

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

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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.

Permission policy.cleanup (administer)

Parameters

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

Request body ConfirmName

Show 1 fields
FieldTypeNotes
confirm_name *stringmaxLength 255

Response 200 CleanupOperationRead

Show 22 fields
FieldTypeNotes
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.

Permission policy.write (prepare)

Parameters

host_id *pathstring (uuid)

Request body PreviewRequest

Show 6 fields
FieldTypeNotes
ack_text_versionstring | null
acknowledgestring[]
itemsPreviewItem[]
kind"disable" | "enable" | "delete" | null
unused_daysinteger | null
uuidsstring[]

Response 200 CleanupPreviewRead

Show 7 fields
FieldTypeNotes
expires_atstring | null
kind *string
max_rules *integer
operation *CleanupOperationRead
plan *map<string, any>
preview_id *string
window_seconds *integer