Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node operation updates an existing Edge Group in Portainer, a management tool for Docker environments and edge computing. Edge Groups are collections of endpoints (devices or environments) that can be managed collectively. The update operation allows modifying the group's name, whether it is dynamic (based on tags), and its membership either by tags (for dynamic groups) or by explicit endpoint IDs (for static groups).

Typical use cases include:

  • Renaming an existing Edge Group to better reflect its purpose.
  • Changing a group from static to dynamic or vice versa.
  • Updating the list of endpoints or tags associated with the group to control which devices belong to it.

For example, you might update an Edge Group named "Factory Floor Devices" to add new endpoints or switch it to dynamic mode to automatically include devices tagged with "factory-floor".

Properties

Name Meaning
Edge Group ID The unique identifier of the Edge Group to update.
Edge Group Name The new name for the Edge Group.
Is Dynamic Boolean flag indicating if the group is dynamic (true) or static (false).
Tag IDs Comma-separated list of tag IDs used to define membership for dynamic groups.
Endpoint IDs Comma-separated list of endpoint IDs defining membership for static groups.

Output

The node outputs the JSON response returned by the Portainer API after updating the Edge Group. This typically includes the updated details of the Edge Group such as its ID, name, dynamic status, associated tags, and endpoints.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests to the Portainer API.
  • The Portainer instance base URL must be set in the credentials.
  • The node sends HTTP PUT requests to the /edge_groups/{edgeGroupId} endpoint of the Portainer API.

Troubleshooting

  • Invalid Edge Group ID: If the provided Edge Group ID does not exist, the API will return an error. Verify the ID is correct.
  • Permission Denied: Ensure the API key has sufficient permissions to update Edge Groups.
  • Malformed Tag or Endpoint IDs: Tag IDs and Endpoint IDs must be comma-separated integers. Invalid formatting may cause request failure.
  • Dynamic vs Static Conflict: When Is Dynamic is true, only Tag IDs should be provided; when false, only Endpoint IDs should be used. Mixing these incorrectly may lead to unexpected behavior.
  • Network Issues: Connectivity problems to the Portainer API will prevent the update operation.

Links and References

Discussion