Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions83

Overview

This node integrates with the Commanders Act API, allowing users to manage various resources within the Commanders Act platform. Specifically, for the Source resource and the Destroy Source operation, it enables deleting a source by its unique identifier. This is useful in scenarios where you want to programmatically remove data sources from your Commanders Act environment, such as cleaning up unused or obsolete sources.

Practical examples:

  • Automatically delete a source after it is no longer needed in your data pipeline.
  • Clean up test sources created during development.
  • Manage sources dynamically based on external triggers or workflows.

Properties

Name Meaning
Source ID The unique identifier of the source to be deleted. This is required for the destroy operation.
Query Parameters Optional additional parameters to customize the API request. Includes options like End, Filter, Granularity, Include, Page, Sort, Start, Token, etc. These allow fine-tuning the request but are generally not required for deletion.

The "Query Parameters" collection supports multiple optional fields such as:

  • end, start: Date/time boundaries.
  • filter and its subfields: JSON filters for refined queries.
  • granularity, include, page, sort: Control pagination and sorting.
  • token: An optional token parameter (password type).

Output

The output is a JSON array containing the response from the Commanders Act API after attempting to delete the specified source. The structure depends on the API's response:

  • If the API returns JSON data, it will be parsed and returned as JSON objects.
  • If the API returns an empty string or no content, the node outputs a status code message "204 No Content".
  • If the response is a plain string that cannot be parsed as JSON, it is returned as text.

No binary data output is produced by 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.
  • Proper configuration of the API credentials in n8n is necessary before use.

Troubleshooting

  • Missing Credentials Error: If the API credentials are not set or invalid, the node throws an error indicating missing credentials. Ensure you have configured a valid API key credential.
  • Missing Source ID: For the Destroy Source operation, if the Source ID is not provided, the node throws an error stating that the Source ID is required.
  • API Errors: Any errors returned by the Commanders Act API are wrapped and thrown as node errors with messages prefixed by "Error calling Commanders Act API". Check the API response and ensure the Source ID exists and you have permission to delete it.
  • Parsing Errors: If the API returns unexpected non-JSON responses, the node attempts to handle them gracefully but may output raw text or status messages.

Links and References


This summary focuses on the Source resource and the Destroy Source operation as requested.

Discussion