Delete Network Group icon

Delete Network Group

Delete a network group by ID

Overview

This node deletes a specified network group by its ID from a firewall or network management system via an API call. It is useful in automation workflows where network groups need to be programmatically removed, such as cleaning up unused groups, enforcing security policies, or managing dynamic network configurations.

For example, if you have a list of network group IDs that are no longer needed, this node can be used to delete each group automatically without manual intervention.

Properties

Name Meaning
Group ID The unique identifier of the network group to delete. Example format: "group-123". This property is required.

Output

The node outputs JSON data for each input item processed, containing:

  • success: Boolean indicating whether the deletion was successful.
  • message: A message returned from the API or a default success message.
  • id: The ID of the network group 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 JSON will include:

  • success: false
  • error: The error message describing what went wrong.
  • statusCode: HTTP status code returned by the API.
  • response: Additional response details or error body text.
  • id: The network group ID related to the failed operation.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the firewall or network management API.
  • The node expects the API base URL to be provided via credentials.
  • The API endpoint used is /api/pt/ip/group/{groupId} with an HTTP DELETE method.
  • The request includes headers specifying content type and language preferences.

Troubleshooting

  • Common issues:

    • Invalid or missing Group ID: Ensure the Group ID is correctly provided and exists.
    • Authentication failures: Verify that the API key credential is valid and has sufficient permissions.
    • Network connectivity problems: Confirm that the API URL is reachable from the n8n environment.
    • API errors such as 404 (not found) or 403 (forbidden) may indicate incorrect group ID or insufficient permissions.
  • Error messages:

    • Errors include detailed messages with HTTP status codes and API response bodies.
    • If the node is configured to stop on failure, it throws an error with context including the URL, group ID, and response details.
    • To handle errors gracefully, enable "Continue On Fail" in the node settings.

Links and References

  • Refer to your firewall or network management system's API documentation for details on the network group deletion endpoint.
  • n8n documentation on HTTP Request node for understanding underlying HTTP calls.
  • General best practices for API authentication and error handling in automation workflows.

Discussion