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 update a Docker secret via the Portainer API. It is useful in scenarios where you need to modify metadata (specifically labels) of an existing secret in a Docker environment managed through Portainer, without altering the secret's actual content. For example, you might want to add or change labels for organizational or automation purposes while ensuring the secret data remains unchanged.
Properties
| Name | Meaning |
|---|---|
| EndpointID Name or ID | The identifier of the Portainer endpoint to access. You can select from a list of available endpoints or specify an ID using an expression. This determines which Docker environment the secret update will target. |
| Id | The ID or name of the secret to update. This uniquely identifies the secret within the selected endpoint. |
| Version | The version number of the secret object being updated. This is required to prevent conflicting writes and ensure you are updating the correct revision of the secret. |
| Body | The specification of the secret update. Currently, only the Labels field can be changed here. All other fields must remain as they were when retrieved from the SecretInspect endpoint. This should be provided as a JSON string. |
Output
The node outputs JSON data representing the response from the Portainer API after attempting to update the secret. This typically includes details about the updated secret object, such as its ID, version, labels, and other metadata. There is no binary output.
Dependencies
- Requires an active Portainer API endpoint with appropriate permissions.
- Needs an API authentication token configured in n8n credentials to authorize requests to the Portainer API.
- The node dynamically loads available endpoints from Portainer to populate the "EndpointID" property.
Troubleshooting
- Version mismatch error: If the version number provided does not match the current version of the secret, the update will fail to avoid conflicting writes. To fix this, retrieve the latest secret version before updating.
- Invalid body format: The "Body" property must be a valid JSON string containing only allowed changes (labels). Providing invalid JSON or modifying disallowed fields will cause errors.
- Authentication issues: Ensure that the API key credential is correctly set up and has sufficient permissions to update secrets on the specified endpoint.
- Endpoint not found: Selecting an invalid or inaccessible endpoint ID will result in connection errors. Verify the endpoint exists and is reachable.