Actions88
- Container Actions
- Container List
- Container Create
- Container Inspect
- Container Top
- Container Logs
- Container Changes
- Container Export
- Container Stats
- Container Resize
- Container Start
- Container Stop
- Container Restart
- Container Kill
- Container Update
- Container Rename
- Container Pause
- Container Unpause
- Container Attach
- Container Attach Websocket
- Container Wait
- Container Delete
- Container Archive Info
- Container Archive
- Put Container Archive
- Container Prune
- Image Actions
- Network Actions
- Volume Actions
- Swarm Actions
- Node Actions
- Secret Actions
- System Actions
- Exec Actions
- Service Actions
- Task Actions
Overview
This node allows users to delete a secret from a Docker environment managed via the Portainer API. It is useful in scenarios where sensitive information stored as secrets needs to be removed securely, such as when rotating credentials or cleaning up unused secrets. For example, an automation workflow could use this node to delete outdated database passwords or API keys stored as Docker secrets.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The identifier of the Docker endpoint (Portainer environment) where the secret resides. Users can select from a list of available endpoints or specify one using an expression. |
| Id | The unique identifier of the secret to be deleted. This is a required string value specifying which secret to remove. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to delete the secret. Typically, this will confirm whether the deletion was successful or provide error details if it failed. There is no binary output.
Dependencies
- Requires access to a Portainer API instance.
- Needs an API authentication token configured in n8n credentials to authorize requests.
- The node uses the Portainer API endpoint
/api/endpoints/{endpointId}/docker/secrets/{id}for deleting secrets. - The user must have appropriate permissions on the specified Docker endpoint to delete secrets.
Troubleshooting
Common issues:
- Invalid or missing
endpointId: Ensure the selected endpoint exists and is accessible. - Incorrect secret
id: Verify the secret ID is correct; otherwise, the API will return an error. - Insufficient permissions: The API token used must have rights to delete secrets on the target endpoint.
- Network or connectivity problems with the Portainer API server.
- Invalid or missing
Error messages:
- 404 Not Found: The secret ID does not exist on the specified endpoint.
- 401 Unauthorized or 403 Forbidden: Authentication failed or insufficient permissions.
- 500 Internal Server Error: Server-side issue; retry later or check Portainer logs.
Resolving these typically involves verifying credentials, endpoint selection, and secret IDs.