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 for companies. Specifically, the "Update Access Code For Company" operation under the "Access Code" resource allows users to update details of an existing access code associated with a company.

Common scenarios where this node is beneficial include:

  • Updating permissions or metadata of access codes used for security systems within a company.
  • Modifying group permissions linked to an access code to control arming/disarming capabilities.
  • Enabling or disabling access codes or changing their names and indexes.

Practical example:
A security administrator wants to update an access code's permissions so that a specific user group can now disarm the system but not arm it. They use this node to specify the company, hub, and access code IDs, then set the new group permissions accordingly.

Properties

Name Meaning
Company Id The unique identifier of the company to which the access code belongs.
Hub Id The unique identifier of the hub within the company context.
Access Code Id The unique identifier of the access code to be updated.
Groups Permissions A collection allowing multiple entries, each specifying:
- Group Id: Identifier of a user group.
- Group Permissions: Permissions assigned to the group; options are "ARM" and "DISARM".
Additional Fields Optional fields to further customize the access code:
- Name: The name of the access code.
- Index: Numeric index for ordering or identification.
- Arming Permissions: Permissions related to arming modes; options include "ARM", "DISARM", and "NIGHT_MODE".
- Enabled: Boolean flag to enable or disable the access code.

Output

The node outputs JSON data representing the result of the update operation on the access code. This typically includes confirmation of the updated fields and possibly the full updated access code object as returned by the Ajax API.

If the node handles binary data, it would relate to any attachments or files associated with the access code, but based on the provided information, the output is primarily JSON structured data reflecting the updated access code state.

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.
  • No additional external dependencies beyond the Ajax API and its authentication.

Troubleshooting

  • Missing or invalid credentials: Ensure the API key credential for the Ajax API is correctly configured and has sufficient permissions.
  • Invalid IDs: Errors may occur if the provided Company Id, Hub Id, or Access Code Id do not exist or are malformed. Verify these identifiers before running the node.
  • Permission errors: If the API returns permission denied errors, check that the API key has rights to update access codes and that the groups specified have valid permissions.
  • Malformed input: Ensure that the Groups Permissions and Additional Fields collections are properly formatted and contain valid values as per the allowed options.
  • API version mismatch: The node uses a specific API version; if the backend API changes, some operations might fail until the node is updated.

Links and References

Discussion