VyOS icon

VyOS

Interact with VyOS router via HTTP API

Overview

This node interacts with a VyOS router via its HTTP API, specifically focusing on managing the router's configuration. The "Return Values" operation under the "Configuration" resource allows users to retrieve specific parts or the entirety of the VyOS configuration. This is useful for scenarios where you want to programmatically inspect current router settings, audit configurations, or use configuration data in automation workflows.

For example, you might use this node to:

  • Fetch the IP address assigned to a particular interface.
  • Retrieve firewall rules currently applied.
  • Get the full configuration to back it up or analyze changes over time.

Properties

Name Meaning
Configuration Path Space-separated path specifying which part of the configuration to return (e.g., interfaces ethernet eth0 address). Leave empty to get the full configuration.
Additional Fields Collection of optional fields:
Format Output: Whether to format the output for better readability (true/false).
Include Metadata: Whether to include API response metadata such as success or error fields (true/false).

Output

The node outputs JSON data representing the requested configuration values from the VyOS router. If a specific configuration path is provided, the output contains only that subset; otherwise, it returns the entire configuration.

If "Format Output" is enabled, the JSON will be formatted for easier reading.

If "Include Metadata" is enabled, the output JSON will also include additional metadata fields indicating the success status or any errors returned by the API.

No binary data output is produced by this node.

Dependencies

  • Requires an active connection to a VyOS router accessible via HTTP API.
  • Requires an API authentication token or credentials configured in n8n to authenticate requests to the VyOS API.
  • The node expects the base URL and SSL validation preferences to be set through these credentials.

Troubleshooting

  • Common Issues:

    • Incorrect or incomplete configuration path may result in empty or unexpected output.
    • Network connectivity issues or incorrect API credentials can cause authentication failures.
    • If SSL certificate validation is not properly configured, requests may fail unless SSL validation is explicitly disabled.
  • Error Messages:

    • Authentication errors typically indicate invalid or missing API credentials.
    • API response errors may include messages about invalid paths or unsupported operations.
  • Resolutions:

    • Verify the configuration path syntax matches the VyOS configuration hierarchy.
    • Ensure API credentials are correctly set and have sufficient permissions.
    • Check network connectivity and firewall rules between n8n and the VyOS router.
    • Adjust SSL validation settings if using self-signed certificates.

Links and References

Discussion