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 "Group" resource with the operation "Get Group Two-Stage Arming Operation Status." The node facilitates retrieving the status of a two-stage arming process for a specific group within a hub, which is useful in security or alarm system management scenarios where enhanced arming confirmation is required.

Typical use cases include:

  • Monitoring the current state of a group's two-stage arming process.
  • Integrating Ajax security system statuses into automation workflows.
  • Triggering subsequent actions based on the arming status of a group.

For example, after sending an arm command that requires two-stage confirmation, this node can be used to check if the second stage has been completed by providing the token received from the initial arm command.

Properties

Name Meaning
User Id Identifier of the user performing the operation; required to specify the context of request.
Hub Id Identifier of the hub containing the group; required to locate the correct hub.
Group Id Identifier of the group whose two-stage arming status is being queried; required parameter.
Token Token received from the initial arm command when two-stage arming is enabled; required to verify the second stage status.

Output

The node outputs JSON data representing the current status of the two-stage arming operation for the specified group. This typically includes fields indicating whether the second stage has been completed, timestamps, and any relevant status messages or codes returned by the Ajax API.

If the node supports binary data output (not evident from the provided code), it would relate to any binary payloads returned by the API, but no such indication is present here.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service to retrieve group arming statuses.
  • The node uses internal helper classes for HTTP requests and response handling, but these are bundled internally.
  • No additional environment variables or n8n configurations beyond the API credential are necessary.

Troubleshooting

  • Common Issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Incorrect User Id, Hub Id, or Group Id parameters may result in not found errors.
    • Providing an invalid or expired token for the two-stage arming process will prevent successful status retrieval.
  • Error Messages:

    • Authentication errors: Verify that the API key credential is correctly configured and valid.
    • Resource not found: Check that the User Id, Hub Id, and Group Id correspond to existing entities in the Ajax system.
    • Token errors: Ensure the token is the one received from the arm command and has not expired.

Links and References

Discussion