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 bundled source). It supports multiple resources and operations, including the "Installation" resource with the operation "Send Claim Installation Permissions For Company." The node facilitates sending claim installation permissions for a specified company within a hub, optionally setting whether the permission is permanent or limited by duration.

Common scenarios include automating permission management workflows in security or building automation systems where installations are managed per company and hub. For example, an administrator could use this node to grant or revoke installation permissions programmatically based on business logic or external triggers.

Properties

Name Meaning
Company Id The unique identifier of the company for which the installation claim permission is sent.
Hub Id The unique identifier of the hub associated with the installation.
Additional Fields Optional settings:
Permanent: Boolean flag indicating if the permission is permanent.
Duration Hours: Number specifying how many hours the permission lasts if not permanent (required if Permanent is false).

Output

The node outputs JSON data representing the response from the Ajax API after attempting to send the claim installation permissions. This typically includes status information about the request success or failure and any relevant metadata returned by the API.

If the API returns binary data (not evident from the provided code), it would be handled accordingly, but no explicit binary output handling is shown in the static analysis.

Dependencies

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

Troubleshooting

  • Missing Required Fields: Ensure that both "Company Id" and "Hub Id" are provided; these are mandatory.
  • Duration Hours Requirement: If "Permanent" is set to false, "Duration Hours" must be specified and greater than zero.
  • Authentication Errors: Verify that the API key credential is correctly configured and has sufficient permissions.
  • API Response Errors: Check the API response for error messages related to invalid IDs or permission issues.
  • Network Issues: Confirm network connectivity to the Ajax API endpoint.

Links and References

  • Ajax API Documentation (general reference for the Ajax API)
  • n8n Documentation on Creating Custom Nodes
  • @digital-boss/n8n-designpatterns package repository (if accessible) for understanding response-operation patterns

Discussion