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 by the bundled version import). It supports multiple resources and operations, including user-related actions such as updating permissions on behalf of a user for a specific device within a hub.

For the User resource and the operation Update Permission On Behalf Of UserId for BoundUserId on Hub For Single Device, the node allows modifying access permissions for a bound user on a particular device in a hub. This is useful in scenarios where an administrator or system needs to delegate or adjust device access rights dynamically, for example:

  • Granting or revoking a user's permission to view or control a security camera.
  • Adjusting availability conditions based on device state (e.g., only when the device is armed).
  • Managing user-device relationships in smart home or security systems.

Properties

Name Meaning
User Id The identifier of the user on whose behalf the permission update is performed.
Hub Id The identifier of the hub containing the device.
Bound User Id The identifier of the user who is bound to the device and whose permissions are being updated.
Device Id The identifier of the device for which the permission is being updated.
Target Object Type The type of the target object/device. Options: MOTION_CAM_PHOD, MOTION_CAM_OUTDOOR_PHOD, STREAMING_CAMERA, MOTION_CAM_PHOD_FIBRA.
Availability Condition The condition under which the permission is available. Options: ALWAYS_AVAILABLE, AVAILABLE_IF_DEVICE_ARMED.
Active Boolean flag indicating whether the permission is active (true) or inactive (false).
Target Device Id (Optional) Identifier of the target device related to the permission update.

Output

The node outputs JSON data representing the result of the permission update operation. This typically includes confirmation of the updated permission status, details about the affected user, device, and hub, and any relevant metadata returned by the Ajax API.

If the node supports binary data output, it would relate to device-specific content (e.g., images or video streams), but this operation focuses on permission updates and thus primarily outputs structured JSON.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the Ajax API service being accessible and properly configured.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution/execution.
  • No additional external services beyond the Ajax API are required.

Troubleshooting

  • Authentication errors: Ensure that the API key credential is correctly set up and has sufficient permissions.
  • Invalid IDs: Errors may occur if userId, hubId, boundUserId, or deviceId do not correspond to existing entities in the Ajax system.
  • Permission conflicts: Attempting to activate or deactivate permissions inconsistently with device or user states might cause API rejections.
  • Missing required properties: All required fields must be provided; missing mandatory parameters will cause validation errors.
  • Network issues: Connectivity problems with the Ajax API endpoint can lead to timeouts or failed requests.

To resolve these:

  • Double-check all input property values.
  • Verify API credentials and network connectivity.
  • Consult Ajax API documentation for permission model constraints.

Links and References

Discussion