Portainer icon

Portainer

Interact with Portainer via API

Actions190

Endpoints → Endpoint Update Relations

AI-generated

Overview

This node operation, Endpoint Update Relations, is designed to update the relations of an endpoint within the Portainer environment. It allows users to send environment relation data to modify how endpoints are associated or linked in Portainer. This can be useful in scenarios where you need to programmatically manage or reorganize endpoint relationships, such as updating which environments an endpoint belongs to or changing its configuration associations.

Practical examples include:

  • Automating the update of endpoint groupings after infrastructure changes.
  • Synchronizing endpoint relations based on external system data.
  • Managing environment assignments for endpoints in bulk via API calls.

Properties

Name Meaning
Body Environment relations data to update the endpoint's relations. This should be provided as a JSON string representing the new relations configuration.

Output

The node outputs JSON data reflecting the response from the Portainer API after attempting to update the endpoint relations. The structure typically includes confirmation of the update or details about the updated relations. There is no indication that binary data is output by this operation.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • Needs the base URL of the Portainer instance configured in the credentials.
  • Depends on the Portainer API being accessible and the user having sufficient permissions to update endpoint relations.

Troubleshooting

  • Invalid JSON in Body: If the "Body" property contains malformed JSON, the API call will fail. Ensure the JSON string is correctly formatted.
  • Authentication Errors: If the API key or URL is incorrect or missing, authentication will fail. Verify credentials and connection settings.
  • Permission Denied: Insufficient permissions to update endpoint relations will result in errors. Confirm the API user has appropriate rights.
  • API Endpoint Unreachable: Network issues or incorrect base URL can cause request failures. Check connectivity and URL correctness.

Links and References

Discussion