# Destroy

Delete the firewall rule. note that server start allowing/denying traffic on the port once the rule is deleted.

# HTTP Request:

DELETE https://api.serveravatar.com/organizations/{organization}/servers/{server}/firewall-rules/{firewall}

# Curl Request example:

curl --request DELETE \
  --url "https://api.serveravatar.com/organizations/5/servers/15/firewall-rules/869" \
  --header 'content-type: application/json' \
  --header 'Authorization: <YOUR API TOKEN>'

# Response:

# Firewall Rule Delete

  • 200 (Ok)
{
    "message": "Rule has been successfully removed."
}

# Organization Not Found

  • 404 (Not Found)
{
    "message": "Organization not found!"
}

# Server Not Found

  • 404 (Not Found)
{
    "message": "Server not found!"
}

# Firewall Not Found

  • 404 (Not Found)
{
    "message": "Firewall not found!"
}

# Invalid Port

  • 500 (Internal Server Error)
{
    "message": "You can not close this port!"
}

# Firewall Not Enabled

  • 500 (Internal Server Error)
{
    "message": "Please enable firewall to list rules!"
}

# Server Error

  • 500 (Internal Server Error)
{
    "message": "Something went wrong while deleting rule."
}
Last Updated: 3/1/2023, 2:00:48 PM