Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The node named "Ajax" is designed to interact with a specific Ajax API (version indicated in the code). It supports multiple resources and operations, including network-related tasks. For the Network resource with the Update Ethernet Settings operation, this node allows users to update the Ethernet configuration of a device or hub by specifying parameters such as IP address, DNS, gateway, subnet mask, DHCP setting, and identifiers for user and hub.

This node is beneficial in scenarios where automated network configuration updates are needed within an infrastructure managed via the Ajax API. For example, it can be used to programmatically change the Ethernet settings of hubs deployed across different locations without manual intervention.

Properties

Name Meaning
User Id Identifier of the user associated with the network device or hub to update.
Hub Id Identifier of the hub whose Ethernet settings are being updated.
Dns The DNS server address to assign to the Ethernet interface.
Ip The static IP address to set on the Ethernet interface.
Gate The gateway IP address for the Ethernet interface.
Dhcp Boolean flag indicating whether DHCP is enabled (true) or disabled (false).
Mask The subnet mask to assign to the Ethernet interface.

All these properties are required for the Update Ethernet Settings operation under the Network resource.

Output

The node outputs JSON data representing the result of the Ethernet settings update operation. This typically includes confirmation of success or failure, and may contain details about the updated network configuration or error messages if the update failed.

No binary data output is indicated in the provided source code.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the HttpClient class for making HTTP requests to the backend Ajax API.
  • Uses internal modules for state management and operation resolution/execution.
  • The node must be configured with valid credentials that allow access to the Ajax API.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will prevent successful communication with the Ajax API.
    • Incorrect or incomplete network parameters (e.g., invalid IP format) may cause the API to reject the update request.
    • Network connectivity issues between n8n and the Ajax API endpoint could lead to timeouts or errors.
  • Error messages:

    • Authentication errors likely indicate problems with the provided API key or credential setup.
    • Validation errors from the API may specify which network parameter is invalid or missing.
    • General HTTP errors (e.g., 500 Internal Server Error) suggest backend issues or misconfiguration.

To resolve these:

  • Verify API credentials and permissions.
  • Double-check all input parameters for correctness and completeness.
  • Ensure stable network connectivity to the Ajax API service.

Links and References

Discussion