Portainer icon

Portainer

Trabalhe com dados da API do Portainer para gerenciar Docker

Overview

This node integrates with the Portainer API to manage Docker-related resources. Specifically, for the Team resource and the Delete operation, it allows users to delete a team by its ID. This is useful in scenarios where you want to automate the management of teams within your Docker environment managed by Portainer, such as removing obsolete or inactive teams programmatically.

Practical example:

  • Automatically clean up teams that are no longer needed after a project ends.
  • Integrate team deletion into a larger workflow that manages user access and permissions dynamically.

Properties

Name Meaning
Team ID The unique identifier of the team to be deleted.
Force Delete Whether to force deletion even if the team resource is currently in use (true/false).

Output

The node outputs JSON data representing the response from the Portainer API after attempting to delete the specified team. Typically, this will be an empty object or confirmation message indicating successful deletion. If the deletion fails, the output may contain error details returned by the API.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • The base URL of the Portainer instance must be configured in the credentials.
  • The node sends HTTP DELETE requests to the endpoint /teams/{teamId} on the Portainer API.

Troubleshooting

  • Common issues:

    • Invalid or missing Team ID: Ensure the Team ID provided exists and is correct.
    • Insufficient permissions: The API key used must have rights to delete teams.
    • Team in use: If the team is associated with active resources, deletion might fail unless "Force Delete" is enabled.
    • Network connectivity issues to the Portainer API endpoint.
  • Error messages:

    • 404 Not Found: The specified Team ID does not exist.
    • 403 Forbidden: The API key lacks permission to delete teams.
    • 409 Conflict: The team cannot be deleted because it is in use; try enabling "Force Delete".
    • 401 Unauthorized: Authentication failed due to invalid API key.

To resolve errors, verify the Team ID, check API key permissions, and consider using the "Force Delete" option if appropriate.

Links and References

Discussion