Portainer icon

Portainer

Interact with Portainer via API

Actions190

Users → User Update

AI-generated

Overview

This node allows updating user information in the "Users" resource of the Portainer API. It is useful when you need to modify existing user details such as name, email, or other profile attributes programmatically within an n8n workflow. For example, you might use this node to automate user management tasks like updating user roles or contact information based on external triggers or data changes.

Properties

Name Meaning
Id The unique identifier of the user to update. This is a required numeric value specifying which user record will be modified.
Body A JSON string containing the user details to update. This should include the fields and values that need to be changed for the specified user.

Output

The node outputs JSON data representing the updated user object returned by the Portainer API after the update operation completes successfully. This typically includes the user's current state with all properties reflecting the applied changes.

Dependencies

  • Requires an API key credential for authenticating with the Portainer API.
  • The node uses the base URL configured in the credentials to send requests to the Portainer server.
  • The request headers specify Accept: application/json and Content-Type: application/json.

Troubleshooting

  • Invalid User ID: If the provided user ID does not exist, the API may return an error indicating the user was not found. Verify the ID before running the node.
  • Malformed JSON in Body: The body property must be a valid JSON string. Invalid JSON will cause the request to fail. Use proper JSON formatting.
  • Authentication Errors: Ensure the API key credential is correctly configured and has sufficient permissions to update users.
  • API Endpoint Issues: Confirm the base URL in credentials points to a reachable Portainer instance.

Links and References

Discussion