Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The node named "Ajax" is designed to interact with an Ajax API, specifically versioned as indicated in the code. It supports multiple resources and operations, including the "Access Control" resource with the "Send Command To Entity" operation. This operation allows users to send specific commands to entities such as access cards within a security or access control system.

Typical use cases include:

  • Enabling or disabling access cards for users.
  • Unlinking unsafe or compromised access cards from the system.
  • Managing access permissions dynamically through automated workflows.

For example, a security administrator could automate disabling an access card when a user leaves the company or enable it when a new employee joins.

Properties

Name Meaning
User Id The identifier of the user associated with the entity command.
Hub Id The identifier of the hub (central controller) where the entity resides.
Entity Id The identifier of the target entity (e.g., an access card) to which the command applies.
Command The action to perform on the entity. Options: DISABLE_ACCESS_CARD, ENABLE_ACCESS_CARD, UNLINK_UNSAFE
Entity Type The type of entity being targeted. Currently supports: ACCESS_CARD

Output

The node outputs JSON data representing the result of the command sent to the specified entity. This typically includes confirmation of the command execution status, any returned data from the Ajax API, and possibly error messages if the command failed.

If binary data were involved, it would be summarized here, but based on the provided code and properties, the output is purely JSON structured.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service to process commands related to access control entities.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • Requires proper configuration of the API credentials within n8n.

Troubleshooting

  • Common issues:
    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect or non-existent User Id, Hub Id, or Entity Id may lead to errors or no effect.
    • Sending unsupported commands or targeting unsupported entity types will likely result in errors.
  • Error messages:
    • Authentication errors: Verify that the API key credential is correctly set up and has necessary permissions.
    • Not found errors: Check that the User Id, Hub Id, and Entity Id are correct and exist in the system.
    • Command rejected or invalid command: Ensure the command value is one of the supported options.

Links and References

Discussion