Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, specifically managing "Web Container" resources. The "Revert Web Tag" operation allows users to revert a web tag to a previous state or version within their web container management system. This is useful when you want to undo changes made to a web tag, for example, if a recent update caused issues or errors on your website.

Practical scenarios include:

  • Rolling back a web tag configuration after an unsuccessful deployment.
  • Restoring a previously working version of a tag without manually recreating it.
  • Managing tag versions programmatically as part of a CI/CD pipeline for web tags.

Properties

Name Meaning
Tag ID The unique identifier of the web tag to revert.
Query Parameters Optional parameters to customize the API request, such as filters, pagination, sorting, etc.
Request Body JSON object containing additional data for the revert operation (if applicable).

The "Query Parameters" collection supports various optional fields like start, end, filter, sort, and others that can be used to refine the API call, though for the revert operation these are typically not required.

Output

The node outputs the JSON response from the Commanders Act API after attempting to revert the specified web tag. The output structure depends on the API's response but generally includes details about the reverted tag status or confirmation of the revert action.

If the API returns no content (HTTP 204), the node outputs a JSON object indicating "Status Code": "204 No Content".

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to the Commanders Act API.
  • Requires valid API credentials including a site ID and an API token.
  • The node uses HTTP methods PATCH for the revert operation.
  • The base URL for API requests is https://api.commander1.com/v2/{siteId} where {siteId} is provided by the user credentials.

Troubleshooting

  • Missing Credentials: If API credentials are not set or invalid, the node will throw an error indicating missing credentials.
  • Missing Tag ID: The operation requires a Tag ID; omitting this will cause an error stating "Tag ID is required".
  • API Errors: Any errors returned by the Commanders Act API will be wrapped and reported with the message "Error calling Commanders Act API" along with the original error message.
  • Invalid JSON in Request Body: If the request body JSON is malformed, the node may fail parsing it before sending the request.
  • Network Issues: Connectivity problems to the API endpoint will result in request failures.

To resolve these issues:

  • Ensure API credentials are correctly configured.
  • Provide all required parameters, especially the Tag ID.
  • Validate JSON input in the request body.
  • Check network connectivity and API availability.

Links and References


This summary is based solely on static analysis of the provided source code and property definitions.

Discussion