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 managing rooms. Specifically, for the "Room" resource and the "Delete Room" operation, the node deletes a specified room within a given hub and user context.

Common scenarios where this node is beneficial include:

  • Automating the removal of rooms from an Ajax security system setup.
  • Integrating room management into broader workflows, such as cleaning up configurations or updating system layouts dynamically.
  • Managing access control by removing obsolete or unused rooms programmatically.

Example use case: A security administrator wants to automatically delete a room when it is no longer in use, triggered by an external event or schedule.

Properties

Name Meaning
User Id The identifier of the user who owns or manages the room.
Hub Id The identifier of the hub (central device or controller) that contains the room.
Room Id The identifier of the specific room to be deleted.

All three properties are required to perform the deletion operation.

Output

The node outputs JSON data representing the result of the delete operation. Typically, this will include confirmation of successful deletion or details about any errors encountered.

If the node supports binary data output, it would relate to any files or media returned by the Ajax API, but based on the provided code and operation, the output is expected to be purely JSON indicating success or failure status.

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 state and operation resolver classes to manage execution flow.
  • The node requires proper configuration of the API credentials within n8n to function correctly.

Troubleshooting

  • Missing or invalid credentials: Ensure the API key credential is correctly set up and has sufficient permissions.
  • Invalid IDs: Errors may occur if the User Id, Hub Id, or Room Id do not exist or are incorrect. Verify these identifiers before running the node.
  • Network issues: Connectivity problems with the Ajax API endpoint can cause failures; check network access and API availability.
  • API errors: The node may return error messages from the Ajax API, such as authorization failures or resource not found. Review the error message details to adjust inputs or credentials accordingly.

Links and References

Discussion