Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage edge computing stacks, specifically allowing users to delete an Edge Stack resource. The "Delete" operation for the Edge Stack resource enables users to remove a specified edge stack from their Portainer-managed environment.

Common scenarios where this node is beneficial include:

  • Automating cleanup of unused or obsolete edge stacks in a Docker Edge Computing environment.
  • Integrating edge stack lifecycle management into broader automation workflows.
  • Managing edge stacks programmatically without manual intervention in the Portainer UI.

For example, a user might use this node to delete an edge stack identified by its ID after a deployment cycle completes or when decommissioning an edge application.

Properties

Name Meaning
Force Delete Whether to force deletion even if the edge stack resource is currently in use (boolean).
Edge Stack ID The unique identifier of the edge stack to be deleted (string, required).

Output

The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified edge stack. Typically, this will confirm successful deletion or provide error details if the operation failed.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • The node expects the base URL of the Portainer API to be configured in the credentials.
  • Network connectivity to the Portainer server hosting the edge stacks.

Troubleshooting

  • Common Issues:

    • Attempting to delete an edge stack that does not exist or has already been deleted may result in an error.
    • Deletion may fail if the edge stack is currently in use and Force Delete is not enabled.
    • Incorrect or missing Edge Stack ID will cause the request to fail.
  • Error Messages:

    • 404 Not Found: The specified Edge Stack ID does not exist. Verify the ID.
    • 409 Conflict: The edge stack is in use; enable Force Delete to override.
    • 401 Unauthorized: Invalid or missing API key credential. Check authentication settings.
  • Resolution Tips:

    • Ensure the Edge Stack ID is correct and corresponds to an existing stack.
    • Use the Force Delete option cautiously to remove stacks that are actively used.
    • Confirm API credentials and network access to the Portainer instance.

Links and References

Discussion