Doku durchsuchen
Menü
Geändert am Auf GitHub bearbeiten

Server-API: blocklist

Als Markdown kopieren

Diese Routen liegen auf der Server-API, Port 21114 (21121 in Docker). Sie nehmen einen API-Schlüssel in X-API-Key oder ein Anmelde-Token; siehe Die HTTP-API. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.

Addresses, networks and device IDs the server refuses.

GET /api/blocklist

List the blocklist entries.

When the blocklist is not enabled, enabled is false, entries is empty and count is missing.

On the server API, port 21114. Needs blocklist.edit.

200: The entries (application/json)

Field Type What it is
enabled boolean
count integer
entries array of BlocklistEntry or null null when the blocklist is empty
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission

POST /api/blocklist

Block an IP address, a CIDR network or a device ID.

The block is written in the audit log. Only a CIDR value is checked for its form.

On the server API, port 21114. Needs blocklist.edit.

Request body, application/json:

Field Type Required What it is
value string yes the address, network or device ID
type string, one of ip, id, cidr yes
reason string

200: Blocked (application/json)

Field Type
status "blocked"
value string
Error When
400 value is missing, type is not ip, id or cidr, or the CIDR is not valid
401 No credential, or one that is not valid
403 The credential's role lacks the permission
503 The blocklist is not enabled

DELETE /api/blocklist/{entry}

Unblock an IP address, a CIDR network or a device ID.

On the server API, port 21114. Needs blocklist.edit.

Parameter In Type Required What it is
entry path string yes The value as it was blocked; a CIDR network with its slash encoded as %2F

200: Unblocked (application/json)

Field Type
status "unblocked"
entry string
Error When
401 No credential, or one that is not valid
403 The credential's role lacks the permission
404 No such entry
503 The blocklist is not enabled

Durchsucht Seiten, Abschnitte, Befehle und Einstellungen.