Portainer icon

Portainer

Interact with Portainer via API

Actions190

Endpoints → Endpoint Delete Batch

AI-generated

Overview

This node allows batch deletion of endpoints (environments) in Portainer, a container management platform. It is useful for automating the cleanup or removal of multiple environments at once, especially in cloud setups where associated resources might also need to be cleaned up.

A practical example would be deleting several test or staging environments after they are no longer needed, optionally removing related cluster resources to avoid orphaned infrastructure.

Properties

Name Meaning
Body A JSON string representing a list of environments to delete. It can include an optional deleteCluster flag to clean up associated resources for cloud environments.

Output

The node outputs JSON data reflecting the result of the batch delete operation. This typically includes success or error information for each environment requested for deletion.

No binary data output is involved.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • The node uses the base URL from the provided credentials to connect to the Portainer instance.
  • The request expects and sends JSON content.

Troubleshooting

  • Invalid JSON in Body: If the "Body" property contains malformed JSON, the API call will fail. Ensure the JSON string is correctly formatted.
  • Authentication Errors: Missing or incorrect API credentials will cause authentication failures. Verify that the API key and URL are correct.
  • Permission Issues: The API user must have sufficient permissions to delete endpoints; otherwise, the operation will be denied.
  • Partial Failures: Some environments may delete successfully while others fail due to dependencies or resource locks. Check the output for detailed error messages per environment.

Links and References

Discussion