Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with a comprehensive Ajax API platform (version indicated in the code). It supports multiple resources and operations, including controlling the arm state of a security hub for a company group. The node is useful in scenarios where users want to programmatically manage security systems, such as arming or disarming hubs within specific groups of a company.

A practical example is automating security workflows: for instance, automatically arming all hubs in a particular group at closing time or disarming them when employees arrive.

Properties

Name Meaning
Company Id Identifier of the company to which the group and hub belong.
Hub Id Identifier of the specific security hub device to control.
Group Id Identifier of the group within the company that contains the hub.
Command The action to perform on the hub's arm state. Options: ARM (activate security), DISARM (deactivate security).
Ignore Problems Boolean flag indicating whether to ignore any problems encountered during the command execution (true or false).

Output

The node outputs JSON data representing the result of the requested operation. This typically includes confirmation of the command execution status, any relevant response data from the Ajax API, and possibly error details if the operation failed.

If the node handles binary data (not explicitly shown in the provided code), it would relate to files or media returned by the API, but this is not evident here.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API service.
  • Depends on several internal modules for HTTP communication, state management, and operation resolution.
  • The node uses a custom HTTP client and backend logic bundled within the node package.
  • No external environment variables are explicitly required beyond the API credential.

Troubleshooting

  • Common Issues:

    • Invalid or missing API credentials will prevent successful API calls.
    • Incorrect or non-existent Company Id, Hub Id, or Group Id values may cause errors or no effect.
    • Using the wrong command value or omitting required parameters will lead to validation errors.
  • Error Messages:

    • Authentication failures typically indicate issues with the provided API key.
    • Resource not found errors suggest invalid identifiers for company, hub, or group.
    • Network or timeout errors may occur if the Ajax API service is unreachable.
  • Resolutions:

    • Verify that the API key credential is correctly configured and active.
    • Double-check all identifier inputs for correctness.
    • Ensure network connectivity and that the Ajax API endpoint is accessible.

Links and References

  • Ajax API Documentation (general reference for the Ajax security system API)
  • n8n documentation on creating custom nodes
  • Relevant module/package repositories or documentation (if publicly available) for @digital-boss/n8n-designpatterns and related backend components (not linked here due to lack of URLs in source).

Discussion