Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, specifically providing access to its Monitoring resource's "List Notifications" operation. It allows users to retrieve a list of notifications related to monitoring alerts and events within the Commanders Act platform. This is useful for scenarios where you want to programmatically monitor alert notifications, filter them by various parameters, or automate workflows based on notification data.

Practical examples include:

  • Automatically fetching recent monitoring notifications to trigger follow-up actions.
  • Filtering notifications by date ranges, types, or other criteria to analyze system health.
  • Integrating notification data into dashboards or reporting tools.

Properties

Name Meaning
Query Parameters A collection of optional query parameters to filter and control the list of notifications returned. Supported parameters include:
- end: End date/time filter.
- Fields[template]: Template fields filter.
- filter: JSON object for complex filtering.
- filter[begin_date], filter[end_date]: Date range filters.
- filter[from], filter[to]: Additional date/time filters.
- filter[rangeType]: Type of range filter.
- filter[search]: Search string filter.
- filter[segment_id]: Segment ID filter.
- filter[sup_filters][device][]: Device filters.
- filter[sup_filters][location][]: Location filters.
- filter[types]: Notification types filter.
- granularity: Granularity of results.
- include: Additional included data.
- page: Pagination options as JSON.
- sort: Sorting options as JSON or string.
- source: Source filter.
- start: Start date/time filter.
- token: Optional token (password type).

Output

The node outputs an array of JSON objects representing the notifications retrieved from the Commanders Act Monitoring API. Each item corresponds to a notification record with all its associated data fields as returned by the API.

If the API returns no content, the output will indicate a "204 No Content" status.

The node does not output binary data.

Dependencies

  • Requires an API key credential for authenticating with the Commanders Act API.
  • The base URL used for requests is 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 node throws an error about missing API credentials, ensure that the Commanders Act API key is properly configured in n8n.
  • Required Parameter Missing: Some operations require specific IDs or parameters (e.g., Alert ID, Notification ID). For "List Notifications," ensure that query parameters are correctly formatted if used.
  • API Request Errors: Errors from the API will be wrapped and reported with messages like "Error calling Commanders Act API." Check the message and stack trace for details.
  • Empty Response: If the API returns no data, the node outputs a "204 No Content" status. Verify your query parameters or API permissions.
  • Invalid JSON in Query Parameters: The filter and some other parameters expect JSON input; invalid JSON may cause errors.

Links and References


This summary focuses on the "Monitoring" resource and the "List Notifications" operation as requested, based on static analysis of the provided source code and property definitions.

Discussion