Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

This node, named "Ajax," is designed to interact with a specific Ajax API (version indicated in the code). It supports multiple resources and operations, including the "Device" resource with the "Get Device Info For Company" operation. The node fetches detailed information about a particular device associated with a given company and hub.

Common scenarios for this node include:

  • Retrieving device status or metadata within a company's infrastructure.
  • Integrating device data into workflows for monitoring or management purposes.
  • Automating reporting or alerting based on device information.

For example, a user might input a company ID, hub ID, and device ID to obtain real-time details about that device, which can then be used downstream in an automation workflow.

Properties

Name Meaning
Company Id The unique identifier of the company to which the device belongs.
Hub Id The unique identifier of the hub under the specified company where the device is located.
Device Id The unique identifier of the device whose information is being requested.

These properties are all required for the "Get Device Info For Company" operation under the "Device" resource.

Output

The node outputs JSON data containing the detailed information of the specified device within the context of the given company and hub. This typically includes device attributes such as status, configuration, and other metadata as provided by the Ajax API.

If the node supports binary data output, it would represent related device files or media, but based on the provided code and operation, the primary output is structured JSON data describing the device.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on internal modules handling HTTP requests, state management, and operation resolution/execution.
  • The node uses a custom HTTP client to communicate with the backend Ajax API.
  • No additional external services beyond the Ajax API are indicated.

Troubleshooting

  • Missing or invalid credentials: Ensure that the API key credential for the Ajax API is correctly configured in n8n.
  • Invalid IDs: Providing incorrect or non-existent companyId, hubId, or deviceId will likely result in errors or empty responses. Verify these identifiers before execution.
  • Network issues: Connectivity problems with the Ajax API endpoint may cause timeouts or failures.
  • API changes: If the Ajax API version changes, some fields or endpoints might become deprecated, requiring updates to the node or its configuration.

Common error messages might include authentication failures, resource not found, or request timeouts. Resolving them involves checking credentials, verifying input parameters, and ensuring network connectivity.

Links and References

Discussion