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 updating notes on objects. The node facilitates sending requests to the Ajax backend to perform CRUD-like operations on various entities managed by the Ajax system.

A common use case for the "Update Object Note" operation is when you want to modify the content or metadata of a note attached to a specific object within a company’s Ajax-managed environment. For example, updating the text of a maintenance note on a security device or changing its expiration date.

Practical examples:

  • Updating a note's text and expiration date for an object representing a security camera.
  • Modifying metadata such as version or creation date of a note linked to an object in the Ajax system.

Properties

Name Meaning
Company Id Identifier of the company owning the object.
Object Id Identifier of the object to which the note belongs.
Text The new text content of the note.
Note Id Identifier of the note to update.
Expiration Date Expiration timestamp of the note, expressed as milliseconds since 1970-01-01T00:00:00Z (epoch).
Additional Fields Optional additional properties that can be set on the note, including:
- Id (string)
- Version (number)
- Company Id (string)
- Object Id (string)
- Remove On Expiration (boolean)
- Created Date (number, epoch milliseconds)
- Last Modified Date (number, epoch milliseconds)

Output

The node outputs JSON data representing the result of the update operation on the object note. This typically includes the updated note details such as its id, text, expiration date, and any other fields returned by the Ajax API after the update.

If the node supports binary data output, it would represent associated files or attachments related to the note, but based on the provided code and properties, the primary output is JSON structured data about the updated note.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the @digital-boss/n8n-designpatterns package for response-operation resolution and execution.
  • Uses internal modules for HTTP client 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 non-existent companyId, objectId, or noteId may result in errors indicating resource not found.
    • Incorrect formatting of the expiration date (not a valid epoch timestamp) could lead to validation errors.
  • Error messages:

    • Authentication errors: Ensure the API key credential is correctly configured and has necessary permissions.
    • Not found errors: Verify that the specified company, object, and note IDs exist in the Ajax system.
    • Validation errors: Check that required fields are provided and formatted correctly, especially timestamps.

Links and References

  • Ajax API Documentation (general reference for Ajax API)
  • n8n documentation on creating custom nodes
  • @digital-boss/n8n-designpatterns package repository (if accessible) for understanding response-operation patterns used in this node.

Discussion