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 "Device" resource with the "Update Device Info" operation. This operation allows users to update information about a specific device within a system, such as changing its name, assigning it to a room or group, or associating it with a user and hub.

Common scenarios for this node include:

  • Managing smart home or security devices by updating their metadata.
  • Integrating device management into automated workflows where device details need to be synchronized or updated dynamically.
  • Organizing devices within hubs, rooms, and groups for better control and monitoring.

Practical example: A user wants to rename a device and move it to a different room within a hub. Using this node, they provide the device ID, new device name, room ID, and other required identifiers to update the device info accordingly.

Properties

Name Meaning
User Id Identifier of the user who owns or manages the device.
Hub Id Identifier of the hub to which the device belongs.
Device Id Unique identifier of the device to be updated.
Device Name New name to assign to the device.
Room Id Identifier of the room where the device is located.
Group Id Identifier of the group to which the device belongs. Must be an existing group ID or null if groups mode is off.

Output

The node outputs JSON data representing the result of the update operation on the device. This typically includes confirmation of the updated device information or status messages from the Ajax API indicating success or failure of the update.

If the node supports binary data output (not explicitly shown in the provided code), it would relate to any binary content returned by the API, but based on the static analysis, the primary output is structured JSON data reflecting the updated device state.

Dependencies

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

Troubleshooting

  • Missing or invalid credentials: The node requires a valid API authentication token; ensure credentials are correctly configured.
  • Invalid IDs: Providing incorrect or non-existent user, hub, device, room, or group IDs will likely cause errors or failed updates.
  • Group Id constraints: If groups mode is off, the group ID must be either a valid existing group or null; otherwise, the update may fail.
  • API errors: Network issues or server-side problems can cause request failures; check connectivity and API status.
  • Required fields missing: All properties marked as required must be provided; omitting them will cause validation errors.

Links and References

Discussion