Criar ou atualizar filtragem de IP - Upsert
Crie ou atualize uma configuração de IP.
Para criar ou atualizar uma configuração.
http
PUT /api/settings/ip-filtering
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json
{
"denyAll": true,
"enabled": true,
"rules": [
{
"target": "10.0.1.50/32",
"block": false
},
{
"target": "10.0.0.0/8",
"block": true
}
]
}
Respostas:
200 OK: Configuration created/updated successfully500 Internal Server Error:{"errors":["error description"]}
verificar configuração
Aplica permanentemente a configuração temporária.
PATCH /api/settings/ip-filtering/verify
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json
Respostas:
200 OK: Configuration verified401 Unauthorized:{"errors":["Access Forbidden"]}- You’re locked out404 Not Found:{"errors":["unable to verify either no ip-filtering set or not active"]}500 Internal Server Error:{"errors":["error description"]}
Obter configuração atual
Recupera a configuração ativa de filtragem de IP.
GET /api/settings/ip-filtering
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json
Respostas:
200 OK: Configuration verified404 Not Found:{"errors":["unable to verify either no ip-filtering set or not active"]}500 Internal Server Error:{"errors":["error description"]}
Excluir configuração
Remove a filtragem de IP e desativa todas as regras de filtragem.
DELETE /api/settings/ip-filtering
Authorization: apiToken YOUR_API_TOKEN
Content-Type: application/json
Respostas:
204 No Content: Configuration deleted successfully404 Not Found:{"errors":["unable to verify either no ip-filtering set or not active"]}500 Internal Server Error:{"errors":["error description"]}