Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The 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 Update Access Code operation, this node allows users to update details of an existing access code within a specified hub and user context.

This node is beneficial in scenarios where you need to programmatically manage security access codes in an Ajax system, such as updating permissions or metadata associated with an access code. For example, you might use it to modify which groups have ARM or DISARM permissions or to enable/disable an access code remotely.

Properties

Name Meaning
User Id The identifier of the user who owns or is associated with the access code.
Hub Id The identifier of the hub where the access code is registered.
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 group.
- Group Permissions: Permissions assigned to the group; options are ARM and DISARM.
Additional Fields Optional fields to further customize the access code update, including:
- Name: The name of the access code.
- Index: A numeric index value.
- Arming Permissions: Permissions related to arming modes; options include ARM, DISARM, NIGHT_MODE.
- Enabled: Boolean flag indicating if the access code is enabled.

Output

The node outputs JSON data representing the result of the update operation on the access code. This typically includes confirmation of the updated access code's properties and status after the operation completes successfully.

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

Dependencies

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

  • Common Issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing incorrect or non-existent User Id, Hub Id, or Access Code Id will result in errors from the API indicating resource not found.
    • Improperly formatted group permissions or additional fields may lead to validation errors.
  • Error Messages:

    • Authentication errors: Ensure the API key credential is correctly configured and has necessary permissions.
    • Resource not found: Verify that the User Id, Hub Id, and Access Code Id exist and are correct.
    • Validation errors: Check that all required fields are provided and that permissions values are among the allowed options (ARM, DISARM, NIGHT_MODE).

Links and References

Discussion