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 here focusing on the Team resource with the Create operation. It allows users to create a new team within Portainer by specifying the team's name.

Common scenarios where this node is beneficial include automating team management in Portainer environments, such as setting up new teams for projects or departments programmatically during onboarding processes or infrastructure provisioning.

For example, you can use this node to create a team named "DevOps" automatically when setting up your Docker management environment, enabling role-based access control and collaboration within Portainer.

Properties

Name Meaning
Team Name The name of the team to be created in Portainer. This is a required string input.

Output

The node outputs the JSON response from the Portainer API after creating the team. This typically includes details about the newly created team such as its ID, name, and other metadata returned by the API.

No binary data output is involved in this operation.

Dependencies

  • Requires an active connection to a Portainer instance via its API.
  • Needs an API key credential configured in n8n to authenticate requests to the Portainer API.
  • The base URL of the Portainer API must be set in the credentials configuration.

Troubleshooting

  • Common issues:

    • Invalid or missing API key credential will cause authentication failures.
    • Incorrect base URL or network connectivity issues may prevent communication with the Portainer API.
    • Providing an empty or invalid team name will result in API errors.
  • Error messages:

    • Authentication errors usually indicate problems with the API key or credential setup.
    • Validation errors from the API may mention missing or invalid fields like the team name.
  • Resolution tips:

    • Verify that the API key credential is correctly configured and has sufficient permissions.
    • Ensure the Portainer API base URL is reachable from the n8n environment.
    • Double-check that the "Team Name" property is provided and valid before execution.

Links and References

Discussion