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 bundled source). Specifically, for the resource Hub and operation Send Panic Command For Company, it allows users to send a panic alert command to a specified hub within a company. This can be useful in security or emergency response scenarios where an immediate alert needs to be triggered remotely on a hub device associated with a company.

Practical examples include:

  • Triggering a panic alarm on a security hub when an emergency is detected.
  • Sending location data along with the panic command to provide responders with situational awareness.
  • Integrating with broader security systems to automate emergency notifications.

Properties

Name Meaning
Company Id The unique identifier of the company to which the hub belongs. Required to specify the target company.
Hub Id The unique identifier of the hub device that will receive the panic command. Required to specify target.
Location Optional collection of location details to accompany the panic command:
- Latitude: Geographic latitude coordinate (number).
- Longitude: Geographic longitude coordinate (number).
- Accuracy: Accuracy of the location measurement (number).
- Speed: Speed at which the device is moving (number).
- Timestamp: Time at which the location was recorded (number, typically Unix epoch milliseconds).

Output

The node outputs JSON data representing the result of sending the panic command to the specified hub. This output typically includes confirmation of the command being sent, status information, and any relevant response data from the Ajax API.

If the node supports binary data output, it would relate to any binary payloads returned by the API, but based on the provided code and context, the primary output is JSON structured data reflecting the operation's success or failure.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API service.
  • Depends on the @digital-boss/n8n-designpatterns package for operation resolution and execution logic.
  • Uses internal backend modules for HTTP communication and state management.
  • The node must be configured with valid credentials and network access to the Ajax API endpoint.

Troubleshooting

  • Common Issues:

    • Invalid or missing company or hub IDs will cause the operation to fail.
    • Incorrect or expired API credentials will prevent successful authentication.
    • Network connectivity issues may lead to timeouts or failed requests.
    • Providing incomplete or malformed location data might cause the API to reject the request.
  • Error Messages:

    • Authentication errors indicating invalid API keys require checking and updating credentials.
    • Validation errors related to required parameters (companyId, hubId) mean these fields must be correctly filled.
    • API response errors should be inspected for specific messages; often they indicate permission issues or incorrect resource identifiers.

Links and References


Note: The summary is based solely on static analysis of the provided source code and property definitions without runtime behavior inference.

Discussion