Portainer icon

Portainer

Interact with Portainer via API

Actions190

Endpoints → Endpoint Settings Update

AI-generated

Overview

This node allows updating the settings of a specific environment endpoint in Portainer, a container management platform. It is useful when you need to modify configuration details of an existing environment (endpoint) programmatically within an n8n workflow. For example, you might update connection parameters or metadata of an environment after deployment changes or infrastructure updates.

Properties

Name Meaning
Id The unique identifier of the environment (endpoint) to update. This is a required numeric value specifying which endpoint's settings will be modified.
Body A JSON string containing the new details for the environment (endpoint). This should include all relevant configuration fields that need to be updated.

Output

The node outputs the response from the Portainer API after attempting to update the endpoint settings. The json output field contains the updated environment details as returned by the API, reflecting the new configuration state. There is no indication of 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 node uses the Portainer REST API endpoint /api/endpoints/{id} for updating environment settings.

Troubleshooting

  • Invalid Id: If the provided environment ID does not exist, the API will likely return a 404 error. Verify the ID corresponds to an existing environment.
  • Malformed Body: The body must be a valid JSON string representing the environment details. Invalid JSON or missing required fields may cause the API to reject the request.
  • Authentication Errors: Ensure the API key credential is valid and has sufficient permissions to update environment settings.
  • Network Issues: Connectivity problems to the Portainer server will prevent the update operation.
  • API Version Mismatch: Using an incompatible Portainer API version could cause unexpected errors.

Links and References

Discussion