Commanders Act icon

Commanders Act

Use the Commanders Act API

Actions108

Overview

This node integrates with the Commanders Act API to manage various resources within the platform. Specifically, for the User resource and the Delete User operation, it allows you to delete a user by their unique identifier. This is useful in scenarios where you need to programmatically remove users from your Commanders Act account, such as automating user lifecycle management or cleaning up test accounts.

Practical example:

  • Automatically deleting a user after they have been deactivated in another system.
  • Removing users who no longer meet certain criteria without manual intervention.

Properties

Name Meaning
User ID The unique identifier of the user to be deleted.
Query Parameters Optional additional parameters to customize the API request. Includes options like filters, pagination, sorting, date ranges, and tokens.

The Query Parameters collection supports multiple optional fields such as:

  • end, start: Date/time boundaries for filtering.
  • filter and its nested options: JSON-based filters for advanced querying.
  • page, sort: Pagination and sorting controls.
  • Other fields related to event enrichment, live reports, source, token, etc.

Output

The output is a JSON array containing the response from the Commanders Act API after attempting to delete the specified user. Typically, for a successful deletion, the API might return an empty response or a status code indicating success (e.g., 204 No Content). If the API returns data, it will be parsed and included in the output JSON.

No binary data output is produced by this operation.

Example output JSON snippet on success might be:

{
  "Status Code": "204 No Content"
}

Or if the API returns JSON data:

{
  "message": "User deleted successfully",
  "userId": "12345"
}

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 User ID: The node throws an error if the User ID is not provided when performing the delete operation. Ensure the User ID field is filled.
  • API Authentication Errors: If the API key credential is missing or invalid, the node will throw an authentication error. Verify that the API key is correctly configured.
  • HTTP Errors from API: Network issues or invalid requests may cause errors. The node surfaces these as API errors with messages from the Commanders Act API.
  • Unexpected Response Format: If the API returns a non-JSON response, the node attempts to parse it; failure to parse will result in raw text output.

Links and References

Discussion