Development & IT Operations

Bitbucket

Bitbucket

Bitbucket: Overview and setup

Manage repositories, pull requests, and code workflows with the Bitbucket integration.

Connect Bitbucket to Atomicwork to manage repositories, pull requests, and code workflows through the Bitbucket API.

Use cases

By connecting Bitbucket, your teams can:

  • Manage repositories: Create, update, and manage Bitbucket repositories as part of onboarding or project setup workflows.
  • Automate pull request workflows: Create or update pull requests, manage reviewers, and track PR status from Atomicwork.
  • Track issues: Create and update Bitbucket issues from incident or change management workflows.
  • Custom operations: Execute any Bitbucket API call for workflows beyond standard actions.

Permissions

To connect Bitbucket to Atomicwork, you need:

  • Org admin access in Atomicwork
  • Admin access to your Bitbucket workspace with permission to create OAuth consumers

The integration authenticates via OAuth 2.0. Scopes are configured on the Bitbucket OAuth consumer. Based on the operations you plan to use, configure the consumer with:

PermissionPurpose
repository:adminFull repository access — create, update, delete repositories, and manage settings.
repository:readRead-only access to repositories for listing and retrieving repository data.
issue:writeCreate and update issues in Bitbucket repositories.
pullrequest:writeCreate and manage pull requests.

Setup

  • Navigate to Settings > App Store > Bitbucket.
  • Click Connect to initiate the OAuth flow.
  • Sign in with your Bitbucket account and authorize the integration.
  • Once authorized, the integration is active.

Supported workflow actions

ActionDescription
Call APIMake a generic API call to any Bitbucket endpoint. Use this for all repository, pull request, issue, and user management operations.

[!NOTE] Note: Bitbucket currently supports the Call API action, which gives you full access to the Bitbucket REST API. Refer to the Bitbucket API documentation for available endpoints.

Troubleshoot common issues

ErrorCauseResolution
Failed to get tokenToken acquisition failed — client credentials may be incorrect or the redirect URI doesn't match.Verify the OAuth consumer configuration in Bitbucket and re-initiate the connection.
Failed to parse token responseThe OAuth response from Bitbucket could not be processed.Check the OAuth consumer setup in Bitbucket and re-authenticate.
Token refresh failureThe refresh token has expired. Bitbucket rotates refresh tokens on each refresh — if a rotation was missed, the token chain is broken.Re-authenticate the integration from Settings > App Store > Bitbucket.