Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, specifically enabling users to retrieve live report data from the "Live Report Builder" resource. The "Get Live Report Data" operation fetches detailed data for a specified live report, allowing users to query and analyze real-time reporting metrics.

Typical use cases include:

  • Fetching up-to-date analytics or performance metrics from a live report.
  • Automating data retrieval for dashboards or further processing workflows.
  • Applying filters and parameters to customize the data returned by the live report.

For example, a marketing analyst could use this node to automatically pull live campaign performance data into their workflow for real-time monitoring and alerting.

Properties

Name Meaning
Report ID The unique identifier of the live report to retrieve data from.
Query Parameters A collection of optional parameters to refine the data request. These include:
- End: End date/time for the data range.
- Fields[template]: Template fields to include in the response.
- Filter: JSON object or string to filter the data (e.g., by date ranges, segments, device types).
- Filter[begin_date], Filter[end_date], Filter[from], Filter[to]: Specific date/time filters.
- Filter[rangeType]: Type of range filter applied.
- Filter[search]: Search term to filter results.
- Filter[segment_id]: Segment identifier to filter data.
- Filter[sup_filters][device][], Filter[sup_filters][location][]: Additional device/location filters.
- Filter[types]: Types of data to include.
- Granularity: Level of data granularity (e.g., hourly, daily).
- Include: Additional related data to include.
- Page: Pagination details as JSON.
- Sort: Sorting criteria, can be JSON or string depending on context.
- Source: Data source identifier.
- Start: Start date/time for the data range.
- Token: An optional token for authentication or access control (password type).

Output

The node outputs an array of JSON objects representing the live report data retrieved from the API. The structure of each JSON object depends on the specific live report and query parameters used but generally includes metrics, dimensions, and other relevant report data.

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

The node does not output binary data.

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 before using this node.

Troubleshooting

  • Missing Credentials: If the API credentials are not set or invalid, the node will throw an error indicating missing credentials.
  • Required Parameters Missing: For the "Get Live Report Data" operation, the "Report ID" property is mandatory. Omitting it will cause an error.
  • API Errors: Any errors returned by the Commanders Act API will be wrapped and presented with a message like "Error calling Commanders Act API" along with the original error message and stack trace if available.
  • Invalid Query Parameters: Providing malformed JSON or unsupported filter values may result in API errors.
  • Empty Response: If the API returns no data, the node outputs a "204 No Content" status; verify that the report ID and filters are correct.

Links and References

Discussion