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 access codes. Specifically, for the "Access Code" resource and the "Create New Access Code" operation, the node allows users to create a new access code associated with a user and a hub within the Ajax system.

Common scenarios where this node is beneficial include:

  • Automating the creation of access codes for users in security systems.
  • Integrating access control management into workflows, such as provisioning new users or hubs.
  • Managing security credentials programmatically without manual intervention.

Practical example:

  • When onboarding a new employee, automatically generate an access code linked to their user ID and assigned hub, specifying a password and optional duress password or index.

Properties

Name Meaning
User Id The identifier of the user for whom the access code is being created.
Hub Id The identifier of the hub (security device or location) associated with the access code.
Name A descriptive name for the access code.
Password The main access code password consisting of 4-6 digits.
Additional Fields Optional extra fields:
- Duress Password: An alternative 4-6 digit code for duress situations.
- Index: Numeric index representing the access code's position or order.

Output

The node outputs JSON data representing the result of the "Create New Access Code" operation. This typically includes details about the newly created access code such as its identifiers, status, and any metadata returned by the Ajax API.

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

Dependencies

  • Requires an active connection to the Ajax API via an API key credential configured in n8n.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • No additional external dependencies beyond the Ajax API and the configured credential.

Troubleshooting

  • Common issues:
    • Missing or invalid API credentials will prevent successful API calls.
    • Providing invalid or incomplete required properties (e.g., missing User Id, Hub Id, or Password) will cause errors.
    • Passwords not conforming to the 4-6 digit requirement may be rejected by the API.
  • Error messages:
    • Authentication failures: Verify that the API key credential is correctly set up and has necessary permissions.
    • Validation errors from the API: Check that all required fields are provided and formatted correctly.
    • Network or connectivity errors: Ensure that the n8n instance can reach the Ajax API endpoint.

Links and References


Note: The summary focuses on the "Access Code" resource and "Create New Access Code" operation as requested, based on static analysis of the bundled source code and provided property definitions.

Discussion