Bitbucket

Learn how to use Bitbucket with Composio

Overview

Enum

BITBUCKET

Description

Bitbucket is a Git-based code hosting and collaboration platform supporting private and public repositories, enabling teams to manage and review code through pull requests and integrations

Authentication Details

client_id
stringRequired
client_secret
stringRequired
oauth_redirect_uri
stringDefaults to https://backend.composio.dev/api/v1/auth-apps/add
scopes
stringDefaults to webhook,pullrequest:write,project:admin,runner:write,project:write,snippet:write,team:write,pipeline:variable,repository:delete,repository:admin,account:write,wiki,issue:write
base_url
stringDefaults to https://api.bitbucket.org/2.0

Actions

This tool creates a new branch in a specified bitbucket repository. it uses the bitbucket api to create a branch from a specified commit hash.

Action Parameters

name
stringRequired
repo_slug
stringRequired
target_hash
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool creates a new issue in a bitbucket repository. the authenticated user will be set as the issue’s reporter.

Action Parameters

assignee
string
component_id
integer
content
stringRequired
due_on
string
kind
string
milestone_id
integer
priority
string
repo_slug
stringRequired
title
stringRequired
version_id
integer
workspace
stringRequired

Action Response

data
object
error
successful
boolean

Action to create a new comment on an existing bitbucket issue. this tool creates a new comment on an existing issue in a bitbucket repository. the comment can include formatted text and will be associated with the authenticated user.

Action Parameters

content
stringRequired
issue_id
stringRequired
repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool creates a new pull request in a bitbucket repository. it uses the provided parameters (workspace, repo slug, title, source branch, destination branch, description, reviewers, close source branch) to create the pull request via the bitbucket api. it complements bitbucket list pull requests by providing the ability to create new pull requests, essential for code collaboration and review.

Action Parameters

close_source_branch
boolean
description
string
destination_branch
string
repo_slug
stringRequired
reviewers
array
source_branch
stringRequired
title
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool creates a new repository in the specified workspace. it is essential for repository management and serves as an important step in many git workflows.

Action Parameters

description
string
fork_policy
stringDefaults to allow_forks
has_issues
booleanDefaults to True
has_wiki
booleanDefaults to True
is_private
booleanDefaults to True
language
string
project_key
string
repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool deletes a specified issue from a bitbucket repository. it requires write access to the repository.

Action Parameters

issue_id
stringRequired
repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool allows for the permanent deletion of a bitbucket repository. it requires admin access to the repository and the repository:delete scope. it uses the delete endpoint at https://api.bitbucket.org/2.0/repositories/`{workspace}`/`{repo_slug}`. important notes include the irreversible nature of this action and the fact that the deletion does not affect any forks of the repository.

Action Parameters

repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool retrieves the profile information of the currently authenticated user in bitbucket. it can function independently with only authentication required and provides essential user details such as the user’s uuid, display name, avatar url, and account creation timestamp.

Action Parameters

Action Response

data
object
error
successful
boolean

This tool retrieves the contents of a specific file from a bitbucket repository. it uses the bitbucket api endpoint: get https://api.bitbucket.org/2.0/repositories/`{workspace}`/`{repo_slug}`/src/`{commit}`/`{path}`

Action Parameters

commit
stringRequired
path
stringRequired
repo_slug
stringRequired
workspace
stringRequired

Action Response

commit
string
data
string
error
path
string
size
integer
successful
boolean

This tool retrieves a single snippet from bitbucket. the snippet can be retrieved in multiple formats including application/json, multipart/related, or multipart/form-data.

Action Parameters

accept_format
stringDefaults to application/json
encoded_id
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean

Action to list pull requests in a bitbucket repository.

Action Parameters

page
integer
pagelen
integer
repo_slug
stringRequired
state
string
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool retrieves a paginated list of all repositories owned by the specified workspace. it is based on the bitbucket api (get /2.0/repositories/{workspace}) and is designed to be a fundamental operation for listing repositories. the tool requires only the workspace identifier and optionally accepts query parameters such as role, q, and sort to filter and sort the results.

Action Parameters

q
string
role
string
sort
string
workspace
stringRequired

Action Response

data
object
error
successful
boolean

This tool will list all workspaces that the authenticated user has access to. it is a fundamental operation needed before performing any workspace-specific operations, functioning solely with authentication. additionally, it provides essential information for further bitbucket operations.

Action Parameters

q
string
sort
string

Action Response

data
object
error
successful
boolean

This tool lists all members of a specified bitbucket workspace using the get /2.0/workspaces/{workspace}/members api endpoint. it requires the workspace id and supports pagination. the tool is independent and is useful for checking workspace membership, auditing access, and integration with user management systems.

Action Parameters

workspace
stringRequired

Action Response

data
object
error
successful
boolean

Action to update an existing issue in a bitbucket repository. this tool allows updating an existing issue in a bitbucket repository. it uses the put /2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id} endpoint.

Action Parameters

assignee_account_id
string
component
string
content
string
issue_id
stringRequired
kind
string
milestone
string
priority
string
repo_slug
stringRequired
state
string
title
string
version
string
workspace
stringRequired

Action Response

data
object
error
successful
boolean