Overview
This node deletes a physical rule identified by its unique Rule ID from an external firewall or security system via an API call. It is useful in scenarios where automated cleanup or management of firewall rules is required, such as removing outdated or unnecessary access controls programmatically.
For example, you might use this node to:
- Automatically remove firewall rules that are no longer valid after a certain event.
- Integrate with a larger workflow that manages network security policies dynamically.
- Clean up test or temporary rules created during deployment processes.
Properties
| Name | Meaning |
|---|---|
| Rule ID | The unique identifier of the physical rule to delete (e.g., "rule-123") |
Output
The node outputs an array of JSON objects, each corresponding to an input item processed. Each output object contains:
success: Boolean indicating if the deletion was successful.message: A message string returned from the API or a default success message.ruleId: The ID of the rule that was attempted to be deleted.response: The full response object from the API call.
If the deletion fails and the node is set to continue on failure, the output includes:
success: falseerror: The error message describing what went wrong.statusCode: HTTP status code returned by the API.response: Additional response details or error body text.ruleId: The ID of the rule for which deletion failed.
The node does not output binary data.
Dependencies
- Requires an API key credential to authenticate with the external firewall/security system's API.
- The API URL is retrieved from the credentials configuration.
- The node makes HTTP DELETE requests to the endpoint
/api/pt/rule/{ruleId}on the configured API URL. - Proper network connectivity and permissions to access and delete rules on the target system are necessary.
Troubleshooting
Common issues:
- Invalid or missing Rule ID will cause the API call to fail.
- Incorrect or expired API credentials will result in authentication errors.
- Network issues or incorrect API URL configuration can prevent successful communication.
- Trying to delete a non-existent rule may return a 404 error.
Error messages:
- Errors include detailed messages with HTTP status codes and response bodies when available.
- If the node is not set to continue on failure, it throws an error stopping execution with details about the failure.
- To resolve errors, verify the Rule ID exists, check API credentials, ensure the API URL is correct, and confirm network access.
Links and References
- Refer to your firewall or security system’s API documentation for details on rule management endpoints.
- n8n documentation on HTTP Request helper methods and error handling: https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.httpRequest/