Actions72
- Image Actions
- Network Actions
- Node Actions
- Registry Actions
- Secret Actions
- Service Actions
- Stack Actions
- Team Actions
- Template Actions
- User Actions
- Volume Actions
- Webhook Actions
- Config Actions
- Container Actions
- Edge Group Actions
- Edge Stack Actions
Overview
This node integrates with the Portainer API to manage Docker Swarm configurations, specifically allowing users to delete a Docker Swarm config resource. It is useful in scenarios where you need to programmatically remove configuration objects from your Docker Swarm environment managed via Portainer.
For example, if you have obsolete or unused configs in your Docker Swarm cluster and want to automate their cleanup, this node operation can be used to delete those configs by specifying their IDs.
Properties
| Name | Meaning |
|---|---|
| Environment ID | The ID of the Portainer environment/endpoint where the Docker Swarm config resides. |
| Config ID | The unique identifier of the Docker Swarm config to be deleted. |
| Force Delete | Whether to force deletion even if the config resource is currently in use (boolean). |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified config. Typically, for a delete operation, the output will confirm success or provide error details if the deletion failed.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Portainer instance with API access.
- Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
- The base URL of the Portainer API must be set in the credentials.
Troubleshooting
Common Issues:
- Invalid or missing
Environment IDorConfig IDwill cause the API call to fail. - Insufficient permissions or invalid API key may result in authorization errors.
- Trying to delete a config that is currently in use without setting
Force Deleteto true might fail.
- Invalid or missing
Error Messages:
- 404 Not Found: The specified config or environment does not exist. Verify the IDs.
- 401 Unauthorized: Authentication failed. Check the API key credential.
- 409 Conflict: Resource is in use and cannot be deleted unless forced. Set
Force Deleteto true if appropriate.