IP-Filterung erstellen oder aktualisieren – Upsert

Erstellen oder aktualisieren Sie eine IP-Konfiguration.

Eine Konfiguration erstellen oder aktualisieren.

http
PUT /api/settings/ip-filtering
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json

{
  "denyAll": true,
  "enabled": true,
  "supportAccessEnabled": false,
  "rules": [
    {
      "target": "10.0.1.50/32",
      "block": false
    },
    {
      "target": "10.0.0.0/8",
      "block": true
    }
  ]
}

Antworten:

  • 200 OK: Configuration created/updated successfully
  • 500 Internal Server Error:{"errors":["error description"]}

Konfiguration überprüfen

Wendet die temporäre Konfiguration dauerhaft an.

PATCH /api/settings/ip-filtering/verify
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json

Antworten:

  • 200 OK: Configuration verified
  • 401 Unauthorized:{"errors":["Access Forbidden"]}- You’re locked out
  • 404 Not Found:{"errors":["unable to verify either no ip-filtering set or not active"]}
  • 500 Internal Server Error:{"errors":["error description"]}

Aktuelle Konfiguration abrufen

Ruft die aktive IP-Filterkonfiguration ab.

GET /api/settings/ip-filtering
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json

Antworten:

  • 200 OK: Configuration verified
  • 404 Not Found:{"errors":["unable to verify either no ip-filtering set or not active"]}
  • 500 Internal Server Error:{"errors":["error description"]}

Konfiguration löschen

Entfernt die IP-Filterung und deaktiviert alle Filterregeln.

DELETE /api/settings/ip-filtering
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json

Antworten:

  • 204 No Content: Configuration deleted successfully
  • 404 Not Found:{"errors":["unable to verify either no ip-filtering set or not active"]}
  • 500 Internal Server Error:{"errors":["error description"]}