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 code). It supports multiple resources and operations, including user management tasks such as binding a user to a hub. The node acts as a flexible interface to perform various backend operations by sending HTTP requests to the Ajax API.

For the specific Resource "User" and Operation "Bind User To The Hub," the node binds a specified user to a particular hub with a defined role. This operation is useful in scenarios where users need to be associated with hubs for access control, monitoring, or management purposes within the Ajax system.

Practical example:

  • Assigning a technician (user) to a security hub with a "PRO" role to grant them professional-level access.
  • Binding a new user to a home security hub with a "USER" role for basic access.

Properties

Name Meaning
User Id The unique identifier of the user to bind to the hub.
Hub Id The unique identifier of the hub to which the user will be bound.
Login The login name or username of the user.
Hub Binding Role The role assigned to the user on the hub. Possible values: USER, PRO.
Additional Fields Optional additional settings; currently supports: Enrich (boolean) to enrich the data.

Output

The node outputs JSON data representing the result of the bind operation. This typically includes confirmation of the binding, details about the user, the hub, and the assigned role. The exact structure depends on the Ajax API response but generally confirms success or failure and may include enriched user or hub information if requested.

No binary data output is indicated for this operation.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service being available and reachable.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect userId or hubId values may lead to "not found" errors from the API.
    • Assigning an unsupported role value will likely cause validation errors.
    • Network connectivity problems can prevent successful API calls.
  • Error messages and resolutions:

    • Authentication failed: Verify that the API key credential is correctly configured and has necessary permissions.
    • User or Hub not found: Double-check the provided IDs for correctness.
    • Invalid role: Ensure the role is either USER or PRO.
    • Request timeout or network error: Check network connection and API endpoint availability.

Links and References

Discussion