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 network-related functions such as updating GSM SIM card settings. The node facilitates sending requests to the Ajax backend to perform various actions, making it useful for automating device management, configuration updates, and monitoring within the Ajax ecosystem.

A practical example of its use is updating the GSM SIM card settings on a specific hub by providing APN details and credentials, which can be essential for maintaining cellular connectivity and ensuring devices operate correctly on mobile networks.

Properties

Name Meaning
User Id Identifier of the user associated with the network device or hub.
Hub Id Identifier of the hub device whose GSM SIM card settings are to be updated.
Apn Access Point Name string used for cellular network connection (max length 63 characters).
Username Username for authenticating the APN connection (max length 24 characters).
Password Password for authenticating the APN connection (max length 24 characters).
Additional Fields Optional fields; currently supports:
- Sim Card Index Numeric index selecting which SIM card to update (1 or 2).

Output

The node outputs JSON data representing the result of the operation performed on the Ajax API. This typically includes confirmation of the updated GSM SIM card settings or error information if the update failed. The output structure depends on the Ajax API response but generally contains status indicators and any relevant data returned from the backend.

No binary data output is indicated in the source code.

Dependencies

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

Troubleshooting

  • Common Issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing incorrect or incomplete required properties (e.g., missing User Id, Hub Id, or APN) will result in errors.
    • Using invalid values for the SIM card index (other than 1 or 2) may cause the operation to fail.
  • Error Messages:

    • Authentication errors typically indicate issues with the provided API key or token; verify credentials in n8n.
    • Validation errors may occur if required parameters are missing or exceed specified length limits; ensure all inputs meet requirements.
    • Network or HTTP errors could arise from connectivity problems or incorrect endpoint usage; check network access and API availability.

Links and References

Discussion