Portainer icon

Portainer

Interact with Portainer via API

Actions190

Edge Stacks → Edge Stack Update

AI-generated

Overview

This node updates an existing Edge Stack in Portainer by sending new configuration data to the Portainer API. It is useful when you want to modify the deployment or settings of an Edge Stack without recreating it from scratch. For example, you might update the stack's compose file or environment variables to change how containers are deployed on edge devices.

Properties

Name Meaning
Id The unique identifier of the Edge Stack to update. This is a required numeric value.
Body The updated Edge Stack data as a JSON string. This contains the new configuration that will replace the existing stack's settings.

Output

The node outputs the response from the Portainer API after attempting to update the Edge Stack. The json output field typically contains the updated Edge Stack object or status information confirming the update. There is no binary data output.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • The node expects the base URL of the Portainer instance to be configured in the credentials.
  • The Portainer API must be accessible from the n8n environment.

Troubleshooting

  • Invalid Id: If the provided Edge Stack Id does not exist, the API will return an error. Verify the Id is correct.
  • Malformed Body: The Body property must be valid JSON representing the Edge Stack configuration. Invalid JSON will cause request failure.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to update Edge Stacks.
  • Network Issues: Confirm that the Portainer API endpoint is reachable from n8n.
  • Common error messages usually relate to HTTP 4xx or 5xx responses indicating invalid input or server errors. Review the API response message for details.

Links and References

Discussion