Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API to manage monitoring alerts among other resources. Specifically, the "Monitoring" resource with the "Create Alert" operation allows users to create new alerts for the currently connected user in the Commanders Act platform. This is useful for automating alert creation based on custom criteria or events within a workflow.

Practical scenarios include:

  • Automatically setting up monitoring alerts when certain conditions are met in your data pipeline.
  • Creating alerts programmatically as part of a larger automation process to track health or anomalies.
  • Integrating alert creation with other systems to ensure timely notifications and responses.

Properties

Name Meaning
Query Parameters Optional collection of query parameters to customize the API request. Includes fields like end, filter, granularity, page, sort, start, token, etc. These allow filtering, pagination, sorting, and token-based access control.
Request Body JSON object representing the body of the POST request to create the alert. This contains the alert details and configuration as required by the Commanders Act API.

The Query Parameters property supports multiple options such as:

  • end, start: Date/time strings to define time ranges.
  • filter and its nested fields: JSON or string filters for fine-grained querying.
  • granularity: Defines the granularity of data.
  • page, sort: For pagination and sorting.
  • token: A password-type field for secure tokens.

Output

The node outputs an array of JSON objects representing the response from the Commanders Act API after creating the alert. The structure depends on the API's response but typically includes details about the created alert such as its ID, status, and configuration.

If the API returns no content (HTTP 204), the output will contain a status message indicating "204 No Content".

No binary data output is produced by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Commanders Act API.
  • The node uses the base URL https://api.commander1.com/v2.
  • Proper configuration of the API credentials in n8n is necessary before using this node.

Troubleshooting

  • Missing Credentials Error: If the API credentials are not set or invalid, the node throws an error "Missing Commanders Act API Credentials". Ensure you have configured valid API authentication.
  • Required Parameter Missing: If mandatory parameters like alert ID (for other operations) or request body are missing, the node throws errors specifying which parameter is required.
  • API Errors: Any HTTP or API-level errors are caught and rethrown with messages prefixed by "Error calling Commanders Act API". Check the API response and ensure the request body and parameters conform to the API specification.
  • Invalid JSON in Request Body: The request body must be valid JSON; otherwise, parsing errors will occur.

Links and References


This summary focuses on the "Monitoring" resource and "Create Alert" operation as requested, describing the input properties, output, dependencies, and common troubleshooting points based on static analysis of the provided source code and property definitions.

Discussion