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 User - Get operation, it retrieves detailed information about a specific user by their ID from the Portainer system.

Common scenarios where this node is beneficial include:

  • Automating user management workflows in Docker environments managed via Portainer.
  • Fetching user details for auditing or reporting purposes.
  • Integrating user data retrieval into larger automation pipelines involving Docker container orchestration.

Practical example:

  • You want to get detailed information about a user with ID "1" to verify their roles and permissions before performing an action on their behalf.

Properties

Name Meaning
User ID The unique identifier of the user whose information you want to retrieve. Example: "1"

Output

The node outputs JSON data representing the user object retrieved from the Portainer API. This typically includes user details such as username, role, email, and other metadata associated with the user in Portainer.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "Id": 1,
  "Username": "admin",
  "Role": "Administrator",
  "Email": "admin@example.com",
  "Enabled": true,
  ...
}

Dependencies

  • Requires connection to a Portainer instance with API access.
  • 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.

Troubleshooting

  • Common issues:

    • Invalid or missing User ID parameter will cause the request to fail.
    • Incorrect or expired API key may result in authentication errors.
    • Network connectivity issues to the Portainer server can cause timeouts or connection failures.
  • Error messages:

    • 404 Not Found: The specified user ID does not exist in Portainer.
    • 401 Unauthorized: API key is invalid or missing.
    • 400 Bad Request: Malformed request, possibly due to incorrect parameters.
  • Resolutions:

    • Verify the User ID is correct and exists in Portainer.
    • Ensure the API key credential is valid and has sufficient permissions.
    • Check network connectivity and Portainer server status.

Links and References

Discussion