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 "Hub" resource with an operation to "Mark Object As Vacant By Company." The node facilitates sending requests to the backend API to perform actions such as marking an object within a hub as vacant for a given company.

Common scenarios include managing occupancy or availability status of objects (e.g., rooms, desks, or other assets) within a company's hub infrastructure. For example, a facilities manager could use this node to update the vacancy status of a workspace or equipment associated with their company.

Properties

Name Meaning
Company Id The unique identifier of the company for which the object vacancy status will be updated.
Hub Id The unique identifier of the hub where the object resides.
Additional Fields Optional additional parameters; currently supports:
- Accept Legal Agreement (boolean): Whether the legal agreement related to vacancy is accepted.

Output

The node outputs data in JSON format representing the response from the Ajax API after attempting to mark the object as vacant. This typically includes confirmation of the action, status codes, or any relevant metadata returned by the backend service.

If the API returns binary data (not evident from the provided code), it would represent raw content related to the operation, but no explicit binary output handling is shown here.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the @digital-boss/n8n-designpatterns package for operation resolution and execution logic.
  • Uses internal modules for HTTP client communication and state management.
  • The node expects proper configuration of the API credentials within n8n to function correctly.

Troubleshooting

  • Missing or invalid credentials: Ensure that the API key credential is correctly set up and has the necessary permissions.
  • Invalid Company Id or Hub Id: Verify that the provided IDs exist and are correct; otherwise, the API may return errors or fail silently.
  • Legal agreement acceptance: If the operation requires accepting a legal agreement, ensure the corresponding boolean flag is set to true; otherwise, the API might reject the request.
  • API connectivity issues: Network problems or incorrect endpoint configurations can cause failures; check network access and API availability.
  • Error messages from API: These should be inspected in the node's output; common errors might relate to authorization, invalid parameters, or server errors.

Links and References

  • No direct external links are provided in the source code.
  • Refer to the official documentation of the Ajax API (version as per node description) for detailed information on supported resources and operations.
  • Consult n8n community forums or documentation for guidance on setting up API credentials and troubleshooting HTTP request nodes.

Discussion