Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The node named "Ajax" is designed to interact with the Ajax API, specifically version 1 as indicated in the description. It supports multiple resources and operations, including the "Room" resource with the "Get Rooms List" operation (internally referenced as "findRoom"). This node is useful for retrieving lists of rooms associated with a particular user and hub within the Ajax system.

Typical use cases include:

  • Fetching all rooms linked to a specific user and hub for display or further processing.
  • Integrating room data into workflows that require contextual information about physical or logical spaces managed by Ajax.
  • Automating management tasks that depend on room-level details.

For example, a security automation workflow might use this node to get all rooms under a user's control to check their status or configure alerts.

Properties

Name Meaning
User Id The identifier of the user whose rooms are to be retrieved. This is a required string.
Hub Id The identifier of the hub associated with the rooms. This is a required string.

These properties must be provided when using the "Get Rooms List" operation under the "Room" resource.

Output

The node outputs JSON data representing the list of rooms retrieved from the Ajax API for the specified user and hub. The structure typically includes an array of room objects, each containing details such as room identifiers, names, and possibly other metadata relevant to the Ajax system.

If the node supports binary data output, it would relate to any media or files associated with rooms, but based on the provided code and context, the primary output is JSON-formatted room data.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service being available and accessible.
  • 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

  • Missing or invalid credentials: Ensure that a valid API key credential is configured in n8n for the Ajax API; otherwise, authentication will fail.
  • Incorrect User Id or Hub Id: Providing invalid or non-existent identifiers may result in empty results or errors from the API.
  • Network issues: Connectivity problems can cause request failures; verify network access to the Ajax API endpoint.
  • API changes: If the Ajax API version changes or endpoints are deprecated, the node may fail until updated accordingly.
  • Error messages: Common errors might include authentication failures, resource not found, or rate limiting. Check the error message details and verify input parameters and credentials.

Links and References

  • Ajax API Documentation (general reference for the Ajax API)
  • n8n documentation on creating custom nodes
  • Relevant GitHub repositories or npm packages for the used design patterns and HTTP client libraries (not directly linked here due to generic naming)

Discussion