Ajax icon

Ajax

Consume Ajax API (v.0.1.2)

Actions242

Overview

The node named "Ajax" is designed to interact with an Ajax API, specifically version 1 as indicated in the description. It supports multiple resources and operations, including the "Camera" resource with the "Update Camera Settings" operation. This operation allows users to update various settings of a camera device within their system, such as its name, service type, streaming URL, and hierarchical relationships (e.g., parent camera).

This node is beneficial in scenarios where users need to programmatically manage and configure cameras remotely via the Ajax platform. For example, security administrators can automate updating camera configurations across multiple hubs or rooms without manual intervention.

Properties

Name Meaning
User Id Identifier of the user performing the update; required for authorization and context.
Hub Id Identifier of the hub where the camera is located; used to scope the update operation.
Camera Id Unique identifier of the camera whose settings are being updated.
Room Id Identifier of the room containing the camera; helps organize devices logically.
Name New display name for the camera; used for identification in the system UI.
Service Type The type of camera service/protocol used. Options: RTSP_STREAM, XMEYE, HIKVISION, DAHUA, IVIDEON, SAFIRE, UNIVIEW.
Stream Data Url URL providing the stream data for the camera; essential for accessing the video feed.
Dvr Boolean flag indicating whether the camera has DVR capabilities enabled.
Parent Camera Id Optional identifier of a parent camera, establishing a hierarchy or grouping of cameras.

Output

The node outputs JSON data representing the result of the update operation on the camera settings. This typically includes confirmation of the updated fields, status messages, or error information if the update failed. There is no indication that the node outputs binary data.

Dependencies

  • Requires an API key credential for authenticating with the Ajax API.
  • Depends on the external Ajax API service to perform camera management operations.
  • Uses internal helper classes for HTTP communication, state management, and operation execution.
  • No additional environment variables are explicitly required beyond the API authentication.

Troubleshooting

  • Common Issues:

    • Invalid or missing API credentials will prevent successful communication with the Ajax API.
    • Providing incorrect or incomplete identifiers (User Id, Hub Id, Camera Id, Room Id) may cause the update to fail or target the wrong device.
    • Incorrectly formatted or invalid Stream Data URLs could lead to errors or non-functional streams.
    • Selecting an unsupported Service Type option might cause the API to reject the request.
  • Error Messages:

    • Authentication errors usually indicate issues with the provided API key; verify and re-enter credentials.
    • Validation errors from the API may specify which input property is invalid or missing.
    • Network or timeout errors suggest connectivity problems; check network access and API availability.

Links and References

  • Ajax API Documentation (general reference for Ajax API usage)
  • n8n documentation on Creating Custom Nodes
  • Relevant camera service protocol specifications (e.g., RTSP) for understanding stream URLs and configurations

Discussion