Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API, allowing users to manage various resources within the platform. Specifically, for the Workspace resource and the Delete Workspace operation, it enables deleting a workspace by its unique identifier. This is useful in scenarios where you need to programmatically remove obsolete or unused workspaces from your Commanders Act account.

Practical example:

  • Automatically clean up workspaces that are no longer needed after a project ends.
  • Integrate workspace deletion into a larger automation workflow that manages your Commanders Act environment dynamically.

Properties

Name Meaning
Workspace ID The unique identifier of the workspace to delete.
Query Parameters Optional additional parameters to customize the API request. Includes options like end, filter, sort, page, etc. (see below).

Details on "Query Parameters" options:

  • 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)
  • Source
  • Start
  • Token (password type)

These parameters allow fine-tuning the API call, though for deleting a workspace typically only the Workspace ID is mandatory.

Output

The node outputs the JSON response returned by the Commanders Act API after attempting to delete the workspace. The output structure depends on the API's response but generally includes confirmation of deletion or error details.

If the API returns no content (HTTP 204), the node outputs an 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 via an API key credential (referred generically as "an API key credential").
  • The node uses the base URL https://api.commander1.com/v2.
  • Proper permissions to delete workspaces in the Commanders Act account are necessary.
  • The node expects the API token and site ID to be configured in the credentials.

Troubleshooting

  • Missing Workspace ID: If the Workspace ID is not provided, the node throws an error stating "Workspace ID is required". Ensure this property is set.
  • Authentication errors: If API credentials are missing or invalid, the node will throw an error about missing credentials or authorization failure.
  • API errors: Any errors returned by the Commanders Act API (e.g., workspace not found, insufficient permissions) will be surfaced as node errors with descriptive messages.
  • Empty response: A 204 No Content response means the deletion was successful but no further data is returned.

To resolve issues:

  • Verify the Workspace ID is correct and exists.
  • Confirm API credentials are valid and have sufficient rights.
  • Check network connectivity and API endpoint availability.

Links and References

Discussion