Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The node named "Ajax" is designed to interact with the Ajax API, providing a flexible interface to perform various operations on multiple resources such as hubs, users, devices, and more. Specifically, for the "Hub" resource and the "Clean Hub Cache" operation, this node allows users to clear or reset the cache associated with a particular hub identified by its Hub Id and User Id. This can be useful in scenarios where cached data might be outdated or corrupted, ensuring that subsequent operations work with fresh data.

Practical examples include:

  • Clearing the cache after configuration changes to a hub to ensure updated settings are applied.
  • Resetting cached states when troubleshooting connectivity or synchronization issues with a hub.

Properties

Name Meaning
User Id The unique identifier of the user who owns or manages the hub.
Hub Id The unique identifier of the hub whose cache needs to be cleaned.

Output

The node outputs JSON data representing the result of the cache cleaning operation on the specified hub. This typically includes confirmation of success or failure and may contain additional metadata about the operation's outcome. The node does not output binary data.

Dependencies

  • Requires an API key credential to authenticate requests against the Ajax API.
  • Depends on the external Ajax API service being available and reachable.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • No additional environment variables or n8n configurations beyond the API credential are explicitly required.

Troubleshooting

  • Common Issues:

    • Invalid or missing User Id or Hub Id parameters will likely cause the operation to fail.
    • Network connectivity problems or incorrect API credentials can prevent successful communication with the Ajax API.
    • If the cache cleaning operation is not supported or fails on the server side, the node may return an error response.
  • Error Messages:

    • Authentication errors indicate invalid or missing API credentials; verify and update the API key.
    • Parameter validation errors suggest required fields (User Id, Hub Id) are empty or malformed; ensure correct values are provided.
    • HTTP errors (e.g., 404, 500) imply issues with the API endpoint or server; check the API status and input parameters.

Links and References

Discussion