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 in the code). It supports multiple resources and operations, including the "Object" resource with an operation to update employee access permissions. The node facilitates managing access control by allowing users to specify which employees have read or read-write permissions on particular objects within a company.

Common scenarios include:

  • Updating access rights for employees on specific objects in a company's system.
  • Automating permission changes based on business rules or workflows.
  • Managing expiration of elevated permissions (read-write) that revert to read-only after a set time.

Practical example:

  • A workflow where an admin updates an employee's access to a sensitive document or asset, granting them read-write permissions temporarily, which automatically downgrade to read-only after a specified expiration date.

Properties

Name Meaning
Company Id Identifier of the company owning the object. Required to specify the context for the access update.
Object Id Identifier of the object whose access permissions are being updated.
Employee Id Identifier of the employee whose access permissions are to be modified.
Permissions Level of access granted to the employee. Options: READ (read-only access), READ_WRITE (read and write access).
Additional Fields Optional extra parameters:
- Version: Numeric version indicator.
- Expiration Date: Timestamp in milliseconds since epoch; applicable only if permissions are READ_WRITE. When reached, permissions automatically change from READ_WRITE to READ.

Output

The node outputs JSON data representing the result of the update operation. This typically includes confirmation of the updated access permissions, possibly the updated state of the object or employee access record.

If binary data were involved, it would represent related files or attachments, but this node focuses on JSON responses from the Ajax API.

Dependencies

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

Troubleshooting

  • Authentication errors: Ensure the API key credential is correctly configured and has sufficient permissions.
  • Invalid IDs: Errors may occur if companyId, objectId, or employeeId do not correspond to existing entities in the Ajax system.
  • Permission value issues: Only READ and READ_WRITE are valid; other values will cause errors.
  • Expiration Date misuse: Setting an expiration date when permissions are not READ_WRITE might be ignored or cause unexpected behavior.
  • API connectivity problems: Network issues or incorrect API endpoint configuration can lead to request failures.

To resolve these:

  • Double-check all input IDs and ensure they exist.
  • Verify the API key and its permissions.
  • Use correct permission values.
  • Confirm network connectivity and API availability.

Links and References

Discussion