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

Creates a new branch in a bitbucket repository from a target commit hash; the branch name must be unique, adhere to bitbucket's naming conventions, and not include the 'refs/heads/' prefix.

Action Parameters

name
stringRequired
repo_slug
stringRequired
target_hash
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Creates a new issue in a bitbucket repository, setting the authenticated user as reporter; ensures assignee (if provided) has repository access, and that any specified milestone, version, or component ids exist.

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
Adds a new comment with markdown support to an existing bitbucket issue.

Action Parameters

content
stringRequired
issue_id
stringRequired
repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Creates a new pull request in a specified bitbucket repository, ensuring the source branch exists and is distinct from the (optional) destination branch.

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
Creates a new bitbucket 'git' repository in a specified workspace, defaulting to the workspace's oldest project if `project key` is not provided.

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
Posts a new top-level comment or a threaded reply to an existing comment on a specified bitbucket snippet.

Action Parameters

content
stringRequired
encoded_id
stringRequired
parent_id
integer
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Permanently deletes a specific issue, identified by its `issue id`, from the repository specified by `repo slug` within the given `workspace`.

Action Parameters

issue_id
stringRequired
repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Permanently deletes a specified bitbucket repository; this action is irreversible and does not affect forks.

Action Parameters

repo_slug
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Retrieves the profile information (uuid, display name, links, creation date) for the currently authenticated bitbucket user.

Action Parameters

Action Response

data
object
error
successful
boolean
Retrieves a specific file's content from a bitbucket repository at a given commit (hash, branch, or tag), failing if the file path is invalid for that commit.

Action Parameters

commit
stringRequired
path
stringRequired
repo_slug
stringRequired
workspace
stringRequired

Action Response

commit
string
data
string
error
path
string
size
integer
successful
boolean
Retrieves a specific bitbucket snippet by its encoded id from an existing workspace, returning its metadata and file structure.

Action Parameters

accept_format
stringDefaults to application/json
encoded_id
stringRequired
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Lists pull requests in a specified, accessible bitbucket repository, optionally filtering by state (open, merged, declined).

Action Parameters

page
integer
pagelen
integer
repo_slug
stringRequired
state
string
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Lists repositories in a specified bitbucket workspace, accessible to the authenticated user, with options to filter by role or query string, and sort results.

Action Parameters

q
string
role
string
sort
string
workspace
stringRequired

Action Response

data
object
error
successful
boolean
Lists bitbucket workspaces accessible to the authenticated user, optionally filtered and sorted.

Action Parameters

q
string
sort
string

Action Response

data
object
error
successful
boolean
Lists all members of a specified bitbucket workspace; the workspace must exist.

Action Parameters

workspace
stringRequired

Action Response

data
object
error
successful
boolean
Updates an existing issue in a bitbucket repository by modifying specified attributes; requires `workspace`, `repo slug`, `issue id`, and at least one attribute to update.

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