Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, specifically enabling management of "Web Containers Variables" among many other resources. The selected operation, Delete Web Datalayer Variables, allows users to delete a specific web datalayer variable by its ID from their Commanders Act environment.

This functionality is useful in scenarios where you need to programmatically clean up or remove obsolete or incorrect datalayer variables from your web container setup. For example, if a variable is no longer used or was created by mistake, this node can automate its deletion as part of a workflow.

Practical examples:

  • Automatically deleting deprecated datalayer variables during a cleanup process.
  • Removing variables that are linked to outdated tags or triggers in your web container.
  • Integrating with other systems to sync and maintain consistent datalayer variable configurations.

Properties

Name Meaning
Datalayer Variable ID The unique identifier of the web datalayer variable to delete. This is required for deletion.
Query Parameters Optional additional parameters to customize the API request. Includes options like filters, pagination, sorting, date ranges, etc.

The Query Parameters collection supports various optional fields such as:

  • end, start: Date/time range boundaries.
  • filter and nested filter options: JSON or string filters to refine queries.
  • page, sort: Pagination and sorting controls.
  • Other fields related to filtering by device, location, segment, types, etc.

Output

The node outputs the response from the Commanders Act API after attempting to delete the specified datalayer variable. The output is a JSON array where each item corresponds to the API response for an input item.

  • If the deletion is successful and the API returns data, it will be included as JSON.
  • If the API returns no content (HTTP 204), the output will contain a status message "204 No Content".
  • If the response is a string, the node attempts to parse it as JSON; otherwise, it outputs the raw text.

No binary data output is produced by this operation.

Dependencies

  • Requires an active Commanders Act API credential configured in n8n with valid site ID and API token.
  • The node makes HTTP requests to the Commanders Act API endpoint at https://api.commander1.com/v2.
  • Proper permissions on the API token to delete web datalayer variables are necessary.

Troubleshooting

  • Missing Credentials Error: If the API credentials are not set or invalid, the node throws an error indicating missing credentials. Ensure the API key/token and site ID are correctly configured.
  • Required Parameter Missing: If the "Datalayer Variable ID" is not provided when performing the delete operation, the node throws an error stating this parameter is required.
  • API Errors: Any errors returned by the Commanders Act API (e.g., unauthorized, not found, forbidden) will be wrapped and reported by the node. Check the API token permissions and the validity of the datalayer variable ID.
  • Parsing Response Issues: If the API returns unexpected response formats, the node tries to parse JSON but may fallback to raw text. Verify API responses and network connectivity.

Links and References


This summary covers the static analysis of the node's execute method for the "Web Containers Variable" resource and "Delete Web Datalayer Variables" operation based on the provided source code and properties.

Discussion