Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, specifically enabling the creation of a "Destination" resource. It allows users to create new destinations within the Commanders Act platform by sending a properly structured request to the API. This is useful in scenarios where you want to programmatically add new data destinations for integrations or data flows managed by Commanders Act.

Practical examples include:

  • Automating the setup of new marketing or analytics destinations.
  • Integrating destination creation into larger workflows that manage data pipelines.
  • Dynamically creating destinations based on external triggers or events.

Properties

Name Meaning
Query Parameters A collection of optional query parameters to customize the API request. Includes options like:
- End
- Fields[template]
- Filter (JSON)
- Filter[begin_date]
- Filter[end_date]
- Filter[from]
- Filter[rangeType]
- Filter[search]
- Filter[segment_id]
- Filter[sup_filters][device][]
- Filter[sup_filters][location][]
- Filter[to]
- Filter[types]
- Granularity
- Include
- Page (JSON)
- Sort (JSON or string depending on context)
- Source
- Start
- Token (password type)
Request Body JSON object representing the body of the POST request to create the destination. This should contain all necessary fields as per the Commanders Act API specification for creating a destination.

Output

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

If the API returns a string response, the node attempts to parse it as JSON; if parsing fails, it returns the raw text. If no content is returned (HTTP 204), the output will indicate "204 No Content".

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to the Commanders Act API.
  • Needs valid API credentials including a site identifier and an API token.
  • The node uses HTTP requests to the base URL https://api.commander1.com/v2.
  • Proper credential configuration in n8n is required to authenticate API calls.

Troubleshooting

  • Missing Credentials: The node throws an error if the API credentials are not provided or invalid. Ensure that the API key/token and site ID are correctly configured.
  • Required Parameters Missing: For this operation, the request body must be provided. Omitting it or providing malformed JSON will cause errors.
  • API Errors: Any error returned by the Commanders Act API will be wrapped and thrown as a node error with the message prefixed by "Error calling Commanders Act API".
  • Invalid Query Parameters: Providing unsupported or incorrectly formatted query parameters may result in API errors.
  • Parsing Response Failures: If the API returns a non-JSON string, the node will return the raw text. Unexpected formats might require checking the API documentation or logs.

Links and References

Discussion