Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with the Ajax API (version indicated in the code). It supports multiple resources and operations, including Access Control. Specifically, for the Access Control resource, it can retrieve the status of an asynchronous operation related to access control by using a token received from a prior request.

Common scenarios where this node is beneficial include:

  • Monitoring the progress or completion status of long-running or asynchronous access control operations initiated elsewhere.
  • Integrating Ajax security system events or state changes into automated workflows.
  • Polling for updates on user or hub-related async tasks within the Ajax ecosystem.

For example, after initiating an access control change that runs asynchronously, you can use this node to check the current status of that operation by providing the user ID, hub ID, and the token returned when the operation started.

Properties

Name Meaning
User Id The identifier of the user related to the access control async operation status request.
Hub Id The identifier of the hub associated with the async operation.
Token The token received from the initial request that began the asynchronous operation; used to query its status.

Output

The node outputs JSON data representing the status of the requested asynchronous access control operation. This typically includes fields indicating whether the operation is still pending, completed successfully, or failed, along with any relevant metadata or results returned by the Ajax API.

If the node supports binary data output, it would relate to any binary content returned by the Ajax API, but based on the provided code and context, the primary output is structured JSON reflecting operation status.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the @digital-boss/n8n-designpatterns package for response operation resolution and execution logic.
  • Uses internal backend modules for HTTP communication and state management.
  • The node expects proper configuration of the Ajax API credentials within n8n.

Troubleshooting

  • Missing or invalid credentials: Ensure the API key credential for the Ajax API is correctly configured and has sufficient permissions.
  • Invalid or expired token: The token property must be the exact token received from the initial async operation request. Using an incorrect or expired token will likely cause errors or empty responses.
  • Incorrect User Id or Hub Id: Providing wrong identifiers may result in no data found or error responses.
  • API connectivity issues: Network problems or API downtime can cause request failures; verify network access and API service status.
  • Error messages from the API: These should be inspected in the node's execution logs. Common errors might include authentication failures, invalid parameters, or rate limiting.

Links and References

Discussion