Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API to manage monitoring alerts. Specifically, the "Monitoring" resource with the "List Alerts" operation allows users to retrieve a list of alerts associated with the currently connected user. This is useful for scenarios where you want to monitor system or application health by fetching alert data programmatically and then use it in workflows for notifications, logging, or automated responses.

Practical examples include:

  • Automatically retrieving current alerts to trigger notifications or escalations.
  • Aggregating alert data for reporting or dashboarding purposes.
  • Filtering alerts based on specific query parameters such as date ranges or types.

Properties

Name Meaning
Query Parameters A collection of optional parameters to filter and control the alert listing. Includes:
- End (string): End date/time for filtering alerts.
- Fields[template] (string): Template fields to include.
- Filter (JSON): Complex filter criteria in JSON format.
- Filter[begin_date], Filter[end_date] (string): Date range filters.
- Filter[from], Filter[to] (string): Additional range filters.
- Filter[rangeType] (string): Type of range filter.
- Filter[search] (string): Search term filter.
- Filter[segment_id] (string): Segment identifier filter.
- Filter[sup_filters][device][] (string array): Device-specific filters.
- Filter[sup_filters][location][] (string array): Location-specific filters.
- Filter[types] (string): Types of alerts to filter.
- Granularity (string): Level of detail or aggregation.
- Include (string): Additional related data to include.
- Page (JSON): Pagination details.
- Sort (JSON/string): Sorting options.
- Source (string): Source identifier filter.
- Start (string): Start date/time for filtering alerts.
- Token (string, password): Optional token for authentication or filtering.

Output

The output is a JSON array where each element represents an alert object retrieved from the Commanders Act API. The structure of each alert object depends on the API response but typically includes alert metadata such as ID, status, timestamps, type, and other relevant alert details.

If the API returns no content, the node outputs a JSON object indicating "204 No Content".

No binary data output is involved in 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 for all requests.
  • Proper configuration of the API credentials within n8n is necessary.
  • The node expects valid input parameters according to the selected operation and resource.

Troubleshooting

  • Missing Credentials: If the API credentials are not set or invalid, the node will throw an error indicating missing credentials.
  • Required Parameter Missing: For some operations, required parameters like Alert ID must be provided; otherwise, the node throws an error specifying which parameter is missing.
  • API Errors: If the API call fails, the node throws an error with the message returned by the API. Check the API token validity, network connectivity, and parameter correctness.
  • Invalid JSON in Filters: When using JSON-type filters, ensure the JSON is well-formed to avoid parsing errors.
  • Empty Response: A "204 No Content" status means no alerts matched the query; verify your filters and parameters.

Links and References

Discussion