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 by the bundled version file). It acts as a generic client for various Ajax API resources and operations, allowing users to perform actions such as updating access requests, managing users, hubs, rooms, devices, and more within the Ajax ecosystem.

Specifically, for the Pro resource and the Update Current Access Request operation, this node updates the status of an existing access request associated with a user in a particular hub. This can be useful in scenarios where an administrator or system needs to approve or decline access requests dynamically through automation workflows.

Practical examples:

  • Automatically declining or approving access requests based on external criteria.
  • Integrating Ajax access control management into broader security or facility management workflows.
  • Synchronizing access request statuses with other systems like CRM or helpdesk tools.

Properties

Name Meaning
User Id The unique identifier of the user whose access request is being updated.
Hub Id The unique identifier of the hub where the access request exists.
Request Number The numeric identifier of the specific access request to update.
Declined Boolean flag indicating whether the access request is declined (true) or approved (false).

Output

The node outputs JSON data representing the result of the update operation on the current access request. This typically includes confirmation of the updated status and any relevant metadata returned by the Ajax API.

If the node supports binary data output, it would represent related files or attachments from the Ajax API, but based on the provided code and properties, the primary output is structured JSON reflecting the updated access request state.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the @digital-boss/n8n-designpatterns package for resource-operation resolution and execution logic.
  • Uses internal backend modules for HTTP communication and state management.
  • The node expects proper configuration of the Ajax API credentials within n8n.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect userId, hubId, or requestNumber values may lead to "not found" errors or failed updates.
    • Network connectivity problems can prevent successful API calls.
  • Error messages:

    • Authentication errors: Verify that the API key credential is correctly set up and has sufficient permissions.
    • Resource not found: Check that the specified user, hub, and request number exist and are correct.
    • Validation errors: Ensure all required parameters are provided and valid (e.g., requestNumber must be a positive number).

Links and References

  • Ajax API Documentation (general reference for Ajax API)
  • n8n documentation on creating custom nodes
  • @digital-boss/n8n-designpatterns package repository (if publicly available) for understanding resource-operation patterns

Discussion