Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The node named "Ajax" is designed to interact with an Ajax API, specifically version 1 as indicated in the description. It supports multiple resources and operations, including the "Hub" resource with the "Execute Buses Power Command" operation. This particular operation allows users to control the power state of buses associated with a specified hub within a company.

Common scenarios for this node include automating power management tasks in smart building or IoT environments where hubs manage multiple devices or subsystems (like buses). For example, a user might want to remotely turn on or off the power supply to certain buses in a hub to save energy or perform maintenance.

Practical example:

  • A facility manager wants to turn off all buses connected to a specific hub during non-working hours to reduce power consumption.
  • An automation workflow triggers turning on buses when a shift starts.

Properties

Name Meaning
Company Id The unique identifier of the company that owns the hub.
Hub Id The unique identifier of the hub where the buses are located.
Busses Power The desired power state to set for the buses. Options: "ON" to power on, "OFF" to power off.

Output

The node outputs JSON data representing the result of the executed command. This typically includes confirmation of the action taken, status messages, or any relevant response from the Ajax API regarding the power state change of the buses.

If the node supports binary data output, it would relate to any binary payloads returned by the API, but based on the provided code and context, the primary output is JSON structured data reflecting the operation's outcome.

Dependencies

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

Troubleshooting

  • Common issues:

    • Invalid or missing Company Id or Hub Id leading to failed requests.
    • Incorrect or expired API credentials causing authentication errors.
    • Network connectivity problems preventing communication with the Ajax API.
    • Unsupported or invalid values for the "Busses Power" property.
  • Error messages and resolutions:

    • Authentication errors: Verify that the API key credential is correctly configured and valid.
    • Resource not found or invalid IDs: Double-check the Company Id and Hub Id inputs.
    • API request failures: Ensure network access to the Ajax API endpoint and check for any rate limits or service outages.
    • Validation errors on input properties: Confirm that all required fields are filled and options are selected properly.

Links and References

Discussion