List Physical Rules icon

List Physical Rules

List all Physical rules with filters

Overview

This node, named "List Physical Rules," is designed to retrieve a list of physical rules from an external firewall API. It supports filtering and pagination, allowing users to specify criteria such as device group ID, rule precedence, and additional custom filters. This node is useful in scenarios where network administrators or security engineers want to programmatically query and analyze firewall rules, for example, to audit configurations, monitor changes, or integrate rule data into other workflows.

Practical examples include:

  • Fetching a subset of firewall rules for a specific device group to review or report on.
  • Paginating through large sets of rules to process them in batches.
  • Applying filters to narrow down rules by precedence or other criteria for targeted analysis.

Properties

Name Meaning
Limit Max number of results to return (minimum 1).
Offset Number of rules to skip for pagination (minimum 0).
Device Group ID Filter rules by the specified device group ID (string identifier).
Precedence Filter rules by their precedence level (e.g., "high").
Filter Additional filter criteria as a string to further refine the search results.

Output

The node outputs an array of JSON objects, each containing:

  • success (boolean): Indicates if the request was successful.
  • rules (array): The list of retrieved physical rules matching the filters.
  • totalRules (number): The count of rules returned in this response.
  • limit (number): The limit parameter used in the request.
  • offset (number): The offset parameter used in the request.
  • response (object): The full raw response from the API call for reference.

If the node encounters an error and is configured to continue on failure, it outputs an object with:

  • success: false
  • error: Error message string.
  • statusCode: HTTP status code of the failure.
  • response: Response body or text from the failed API call.
  • rules: An empty array.

The node does not output binary data.

Dependencies

  • Requires an API key credential to authenticate with the external firewall API.
  • The API base URL is obtained from the credentials configuration.
  • The node makes HTTP POST requests to the endpoint /api/pt/rules on the configured API server.
  • The request includes headers specifying content type as JSON and language preference.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect or malformed filter parameters may result in no data or errors.
    • Network connectivity problems can prevent reaching the API endpoint.
    • Pagination parameters (limit and offset) must be valid numbers; otherwise, the API might reject the request.
  • Error messages:

    • Errors include detailed messages with HTTP status codes and response bodies when available.
    • If the node fails to list rules, it throws an error indicating the failure reason, status code, response content, and the request details.
    • To handle intermittent failures gracefully, enable "Continue On Fail" in the node settings.

Links and References

  • No direct links are provided in the source code. For more information, consult the documentation of the external firewall API that this node interacts with.

Discussion