Créer ou mettre à jour le filtrage IP - Upsert

Créer ou mettre à jour une configuration IP.

Pour créer ou mettre à jour une configuration.

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
    }
  ]
}

Réponses :

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

vérification de la configuration

Applique de manière permanente la configuration temporaire.

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

Réponses :

  • 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"]}

Obtenir la configuration actuelle

Récupère la configuration active du filtrage IP.

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

Réponses :

  • 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"]}

Supprimer la configuration

Supprime le filtrage IP et désactive toutes les règles de filtrage.

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

Réponses :

  • 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"]}