Bitbucket Data Center icon

Bitbucket Data Center

Interact with Bitbucket Data Center API

Overview

This node interacts with the Bitbucket Data Center API to retrieve information about users. Specifically, the "User" resource with the "Get" operation allows you to fetch details for a specific user by username or, if no username is provided, for the current authenticated user.

Common scenarios where this node is beneficial include:

  • Retrieving profile information of a particular user in your Bitbucket Data Center instance.
  • Fetching details about the currently authenticated user without specifying a username.
  • Integrating user data into workflows that require user metadata, such as automation of permissions, notifications, or audit logs.

Practical example:

  • You want to get the email and display name of a user named "johndoe" to send them a notification.
  • You want to verify the identity of the current API user running an automated process.

Properties

Name Meaning
Authentication Method of authentication to use: either "Personal Access Token" or "Basic Auth".
Username The username to get information for. If left empty, the node fetches info for the current authenticated user.

Output

The node outputs JSON data representing the user information retrieved from the Bitbucket Data Center API.

  • If a username is specified, the output contains the detailed user object for that username.
  • If no username is specified, it returns the user object for the current authenticated user.
  • The structure of the user object follows Bitbucket Data Center's user schema, typically including fields like name, displayName, emailAddress, active status, and other profile-related information.

No binary data output is produced by this node.

Dependencies

  • Requires access to a Bitbucket Data Center server.
  • Requires credentials configured in n8n for authentication, either via a personal access token or basic authentication.
  • The node uses the Bitbucket Data Center REST API endpoints under /rest/api/1.0/user or /rest/api/1.0/users/{username}.

Troubleshooting

  • Error: "Bitbucket Data Center API request failed"
    This indicates a failure in communicating with the Bitbucket API. Check that:

    • The server URL in the credentials is correct and accessible.
    • The authentication credentials (token or username/password) are valid and have sufficient permissions.
    • Network connectivity to the Bitbucket server is stable.
  • Error: "Failed to get current username"
    Occurs when no username is provided and the node tries to determine the current user but fails. Ensure the credentials allow fetching the current user info.

  • Empty or unexpected output
    Verify that the username exists in Bitbucket Data Center. If querying the current user, ensure the credentials correspond to a valid user.

Links and References

Discussion