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 provides a flexible interface to perform various operations on multiple resources related to security and surveillance systems. In particular, for the resource User and operation Get Permission For CompanyId On Hub For Surveillance Cameras, it retrieves the permission details that a specified user has for a given company ID on a particular hub concerning surveillance cameras.

Common scenarios where this node is beneficial include:

  • Managing user permissions dynamically within a security system.
  • Integrating permission checks into automated workflows for access control.
  • Auditing or verifying user rights on hubs managing surveillance devices.

Practical example:
A security administrator wants to verify if a user has the necessary permissions to view or manage surveillance cameras connected to a specific hub under a certain company. This node can be used to fetch that permission information programmatically.

Properties

Name Meaning
User Id The unique identifier of the user whose permissions are being queried.
Hub Id The unique identifier of the hub where the surveillance cameras are located.
Company Id The unique identifier of the company associated with the hub and user permissions.

Output

The node outputs JSON data containing the permission details for the specified user on the given company ID and hub related to surveillance cameras. The exact structure depends on the API response but typically includes fields indicating the level or type of permission granted.

If the node supports binary data output, it would relate to any media or files fetched from the API, but based on the provided code and context, the primary output is JSON permission data.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service to retrieve user permission data.
  • Uses internal helper classes for HTTP communication, state management, and operation resolution.

Troubleshooting

  • Missing or invalid credentials: Ensure that the API key credential is correctly configured in n8n; otherwise, authentication will fail.
  • Invalid input parameters: All three properties (User Id, Hub Id, Company Id) are required. Missing or incorrect values may cause errors or empty responses.
  • API connectivity issues: Network problems or API downtime can lead to request failures.
  • Permission denied errors: If the user or API key lacks sufficient rights, the API might return authorization errors.

To resolve these issues:

  • Verify credentials and their permissions.
  • Double-check input property values.
  • Confirm network connectivity and API status.

Links and References

Discussion