Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions83

Overview

This node integrates with the Commanders Act API to manage monitoring notifications among other resources. Specifically, the "Monitoring" resource with the "Create Notification" operation allows users to create a notification for an existing alert within the Commanders Act platform. This is useful in scenarios where automated alerts need to be set up to monitor specific events or conditions and notify relevant stakeholders accordingly.

Practical examples include:

  • Automatically creating notifications when certain thresholds are met in data collection or event monitoring.
  • Setting up alerts for system health or performance issues and generating notifications to trigger workflows or inform teams.

Properties

Name Meaning
Query Parameters Optional key-value pairs to customize the API request query string. Includes parameters like end, filter, granularity, page, sort, start, token, etc. These allow filtering, sorting, pagination, and specifying time ranges for the request.
Request Body JSON object representing the body of the POST request to create the notification. This contains the details of the notification to be created according to the API specification.

The "Query Parameters" property supports multiple options such as:

  • end, start: Define time range boundaries.
  • filter and its nested fields: For advanced filtering criteria.
  • granularity: To specify data granularity.
  • page, sort: For pagination and sorting.
  • token: An optional token parameter (password type).

Output

The node outputs the JSON response returned by the Commanders Act API after creating the notification. The output structure corresponds directly to the API's response schema for a newly created notification, typically including details such as notification ID, status, associated alert information, timestamps, and any metadata provided by the API.

If the API returns no content (HTTP 204), the node outputs a JSON object indicating "Status Code": "204 No Content".

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Commanders Act API.
  • Requires valid API credentials (an API key/token) configured in n8n to authenticate requests.
  • The base URL used is https://api.commander1.com/v2.
  • The node sends requests with Content-Type: application/json and uses Bearer token authentication.

Troubleshooting

  • Missing Credentials: If API credentials are not set or invalid, the node will throw an error indicating missing credentials.
  • Required Parameters Missing: The node validates required IDs and parameters before making requests. For example, if the alert ID is missing when creating a notification, it throws an error specifying the missing field.
  • API Errors: Any errors returned from the Commanders Act API are caught and rethrown as node errors with descriptive messages. Check the error message and stack trace for details.
  • Invalid JSON in Request Body: The request body must be valid JSON; otherwise, parsing errors may occur.
  • Network Issues: Connectivity problems or incorrect base URL configuration can cause request failures.

To resolve these issues:

  • Ensure all required input properties are correctly set.
  • Verify API credentials and permissions.
  • Validate JSON syntax in the request body.
  • Confirm network connectivity and API endpoint accessibility.

Links and References

Discussion