Delen via


Bitbucket

Bitbucket is a web based hosting service for projects that use GIT revision control.

This connector is available in the following products and regions:

Service Class Regions
Logic Apps Standard All Logic Apps regions except the following:
     -   Azure Government regions
     -   Azure China regions
     -   US Department of Defense (DoD)
Power Automate Premium All Power Automate regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Power Apps Premium All Power Apps regions except the following:
     -   US Government (GCC)
     -   US Government (GCC High)
     -   China Cloud operated by 21Vianet
     -   US Department of Defense (DoD)
Contact
Name Microsoft
URL Microsoft LogicApps Support
Microsoft Power Automate Support
Microsoft Power Apps Support
Connector Metadata
Publisher Microsoft
Website https://bitbucket.org/
Privacy policy https://www.atlassian.com/legal/privacy-policy

Throttling Limits

Name Calls Renewal Period
API calls per connection 100 60 seconds
Frequency of trigger polls 1 30 seconds

Actions

Approve pull request

This operation is used to approve an existing pull request.

Create issue

This operation creates a new issue in the given repository.

Decline pull request

This operation is used to decline an existing pull request.

Get issue by id

This operation retrieves all information about the given issue.

Get user by Id

This operation returns all information about a given user by its id.

Merge pull request

This operation can merge a given pull request.

Approve pull request

This operation is used to approve an existing pull request.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Pull Request Id
pullrequestId True string

The Id of the pull request.

Returns

Create issue

This operation creates a new issue in the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Issue Title
title True string
Description
raw string
Issue Type
kind True string
Priority
priority True string

The priority category of the issue.

Status
status string
Component
name string

Pre-defined component value.

Milestone
name string

Pre-defined milestone value.

Version
name string

Pre-defined version value.

Returns

Decline pull request

This operation is used to decline an existing pull request.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Pull Request Id
pullrequestId True string

The Id of the pull request.

Returns

Get issue by id

This operation retrieves all information about the given issue.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Issue Id
issueId True string

The id of the issue.

Returns

Get user by Id

This operation returns all information about a given user by its id.

Parameters

Name Key Required Type Description
User Id
userId True string

The id of the user.

Returns

Merge pull request

This operation can merge a given pull request.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Pull Request Id
pullrequestId True string

The Id of the pull request.

Returns

Triggers

When a new commit is pushed

Triggers when a new commit is pushed to the given repository.

When a new issue is added

Triggers when a new issue is added to the given repository.

When a pull request is approved

Triggers when a pullreqest is approved in the specified repository.

When a pull request is created

Triggers when a new pullreqest is created in the given repository.

When a pull request is declined

Triggers when an existing pullreqest is declined in the given repository.

When a pull request is merged

Triggers when an existing pullreqest is merged in the given repository.

When a repository is added

Triggers when a new repository is created for the authenticated account.

When an issue is updated

Triggers when an issue is updated in the given repository.

When a new commit is pushed

Triggers when a new commit is pushed to the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

When a new issue is added

Triggers when a new issue is added to the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

When a pull request is approved

Triggers when a pullreqest is approved in the specified repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

When a pull request is created

Triggers when a new pullreqest is created in the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

When a pull request is declined

Triggers when an existing pullreqest is declined in the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

When a pull request is merged

Triggers when an existing pullreqest is merged in the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

When a repository is added

Triggers when a new repository is created for the authenticated account.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Returns

When an issue is updated

Triggers when an issue is updated in the given repository.

Parameters

Name Key Required Type Description
Account Name
account True string

Atlassian account or team name

Repository Id
slug True string

Bitbucket repository

Returns

Definitions

WebhookIssueCreatedResponse

Name Path Type Description
Actor
actor Actor
issue
issue Issue
Repository
repository Repository

WebhookIssueUpdatedResponse

Name Path Type Description
Actor
actor Actor
changes
changes Changes
Comment
comment Comment
issue
issue Issue
Repository
repository Repository

WebhookPullRequestApprovedResponse

Name Path Type Description
Approval
approval Approval
Actor
actor Actor
PR
pullrequest PullRequest
Repository
repository Repository

WebhookPullRequestCreatedResponse

Name Path Type Description
Actor
actor Actor
PR
pullrequest PullRequest
Repository
repository Repository

WebhookPullRequestDeclinedResponse

Name Path Type Description
Actor
actor Actor
PR
pullrequest PullRequest
Repository
repository Repository

WebhookPullRequestMergedResponse

Name Path Type Description
Actor
actor Actor
PR
pullrequest PullRequest
Repository
repository Repository

WebhookRepositoryPushResponse

Name Path Type Description
Actor
actor Actor
Push
push Push
Repository
repository Repository

List_repositories_Response

Name Path Type Description
values
values array of object

values

SCM
values.scm string

Source control manager for the repository.

Website
values.website string

Url of the website if defined.

Has Wiki
values.has_wiki boolean

True if the repository has a wiki.

Name
values.name string

Repository's name.

Fork Policy
values.fork_policy string

Allow forks, no public forks or no forks.

UUID
values.uuid string

Repository's immutable id.

Language
values.language string

Programming language used in the repository.

Created Date-Time
values.created_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Has Issue Tracker
values.has_issues boolean

True if an issue tracker has been set for the repository.

Username
values.owner.username string

Username of the repository's owner.

Name
values.owner.display_name string

Display name of the repository's owner.

UUID
values.owner.uuid string

Unique identifier of the repository's owner.

Updated Date-Time
values.updated_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Size
values.size integer

Integer indicating size of the repository in bytes.

Type
values.type string

Git or mercurial.

Slug
values.slug string

Slug used to identify the repository.

Is private
values.is_private boolean

True if the repository is private.

Description
values.description string

The repository's description.

ApprovePullRequestResponse

Name Path Type Description
Role
role string

The role of the pull request.

Type
type string

The type of the pull request.

Username
user.username string

The username of the approver.

Name
user.display_name string

The display name of the approver.

Type
user.type string

User or team.

UUID
user.uuid string

The universally unique identifier of the user.

Is approved
approved boolean

True if the pull request is approved.

DeclineOrMergePullRequestResponse

Name Path Type Description
Description
description string

Pull request description.

Title
title string

Pull request title.

Name
destination.branch.name string

The name of the destination branch.

Hash
destination.commit.hash string

The SHA1 of the destination branch head.

Name
destination.repository.name string

The name of the destination branch repository.

UUID
destination.repository.uuid string

The UUID of the destination branch repository.

Type
destination.repository.type string

The type of the destination branch repository.

Status
state string

Pull request status.

Closed By Username
closed_by.username string

Username of person who closed the PR.

Closed By Name
closed_by.display_name string

Name of person who closed the PR.

User Type
closed_by.type string

Closed by a user or team.

UUID
closed_by.uuid string

Unique identifier of person who closed the PR.

Name
source.branch.name string

Name of the source branch.

Hash
source.commit.hash string

The SHA1 of the source branch head.

Name
source.repository.name string

The name of the source branch repository.

UUID
source.repository.uuid string

The UUID of the source branch repository.

Type
source.repository.type string

The type of the source branch repository.

Name
author.display_name string

The display name of the creator.

Type
author.type string

The type of the creator.

Username
author.username string

The username of the creator

UUID
author.uuid string

The universally unique identifier of the creator.

Created Date-Time
created_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Reason
reason string

The reason the pull request is declined (if so).

Updated on
updated_on string

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Id
id integer

The Id of the pull request.

Task Count
task_count integer

Task count.

IssueResponse

Name Path Type Description
Priority
priority string

The priority of the issue.

Kind
kind string

The kind of issue.

type
repository.type string

The type of the repository.

name
repository.name string

The name of the repository.

full name
repository.full_name string

The full name of the repository.

UUID
repository.uuid string

The Universally Unique Identifier of the repository.

Username
reporter.username string

The username of the reporter.

Display name
reporter.display_name string

The display name of the reporter.

Type
reporter.type string

The type of the reporter.

UUID
reporter.uuid string

The Universally Unique Identifier of the reporter.

Title
title string

The title of the issue.

Component
component.name string

Pre-defined component value.

Votes
votes integer

The number of votes on the issue.

Watches
watches integer

The number of watches on the issue.

text
content.raw string

The description of the issue.

markup
content.markup string

The description markup of the issue.

html
content.html string

The description html of the issue.

Assignee
assignee string

The assigned user of the issue.

Status
state string

The status of the issue.

Version
version.name string

A version value defined by the administrator.

Created on
created_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Milestone
milestone.name string

Pre-defined milestone value.

Updated on
updated_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Type
type string

The type of issue.

Issue Id
id integer

The Id of the issue.

UserResponse

Name Path Type Description
Username
username string

The username.

Type
type string

The user type.

Display Name
display_name string

The display name of the user.

UUID
uuid string

The universally unique identifier of the user.

Actor

Name Path Type Description
Name
display_name string

Full display name of the author.

Type
type string

User or team.

Username
username string

Username or team id.

UUID
uuid string

Unique identifier of the user or team.

Approval

Name Path Type Description
date time
date string

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

display name
user.display_name string

The display name of the approver.

type
user.type string

The type of the approver.

username
user.username string

The username of the approver.

UUID
user.uuid string

The universally unique identifier of the approver.

Changes

Name Path Type Description
New Issue
title.new string

New value for the issue field.

Old Issue
title.old string

Old value for the issue field.

Comment

Name Path Type Description
Id
id integer

Id of the comment added.

Parent Id
parent integer

Id of the parent comment.

Description
content.raw string

Description of the comment.

Updated Date-Time
updated_on string

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)
created_on date-time

created_on

Issue

Name Path Type Description
Title
title string

Issue title.

Milestone
milestone string

Stage the issue has reached.

Updated Date-Time
updated_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Issue Content
content.raw string

Raw issue discription.

Created Date-Time
created_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Component
component string

User defined enumerator value.

Issue Type
type string

Bug, enhancement,proposal or task.

Id
id integer

Issue identifier.

Status
state string

Issue status.

Priority
priority string

Issue's priority category.

Version
version string

String containing a version value.

Kind
kind string

Issue kind as defined in the GUI.

PullRequest

Name Path Type Description
Id
id integer

Id of the pull request.

Reviewers
reviewers array of object

List of reviewers on the pull request.

Description
description string

Description of the pull request.

Name
destination.branch.name string

The name of the destination branch.

Respository Name
destination.repository.name string

Name of the repo where issue is created.

UUID
destination.repository.uuid string

Repository's unique id.

Repository Type
destination.repository.type string

Type of the repo where issue is created.

Closed Branch
close_source_branch boolean

Closes the source branch after merge.

Name
author.display_name string

Display name of the PR author.

Type
author.type string

User or team.

Username
author.username string

Username of the PR author.

UUID
author.uuid string

The universally unique identifier of the author.

Participant
participants array of object
Role
participants.role string

Role of the participant.

Display Name
participants.user.display_name string

Display name of the participant

Type
participants.user.type string

User or team.

Username
participants.user.username string

Participant's username.

uuid
participants.user.uuid string

The universally unique identifier of the user.

Type
participants.type string

The type of participant.

Name
source.branch.name string

Name of the source branch.

Hash
source.commit.hash string

The SHA1 of the source branch head.

name
source.repository.name string

The name of the source branch repository.

UUID
source.repository.uuid string

The UUID of the source branch repository.

Type
source.repository.type string

The type of the source branch repository.

Created Date-Time
created_on date-time

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Status
state string

The status of the pull request.

Reason
reason string

Reason the pull request is declined (if so).

Updated Date-Time
updated_on string

yyyy-MM-ddTHH:mm:ss.fff(+hh:mm or -hh:mm)

Title
title string

The name of the pull request.

Push

Name Path Type Description
changes
changes array of object

changes

created
changes.created boolean

Indicate whether the reference is new.

type
changes.old.type string

type

raw
changes.old.target.author.raw string

raw

date
changes.old.target.date date-time

date

message
changes.old.target.message string

message

hash
changes.old.target.hash string

hash

type
changes.old.target.type string

type

parents
changes.old.target.parents array of object

parents

type
changes.old.target.parents.type string

type

href
changes.old.target.parents.links.html.href string

href

href
changes.old.target.parents.links.self.href string

href

hash
changes.old.target.parents.hash string

hash

href
changes.old.target.links.html.href string

href

href
changes.old.target.links.self.href string

href

name
changes.old.name string

name

href
changes.old.links.commits.href string

href

href
changes.old.links.html.href string

href

href
changes.old.links.self.href string

href

type
changes.new.type string

type

raw
changes.new.target.author.raw string

raw

date
changes.new.target.date date-time

date

message
changes.new.target.message string

message

hash
changes.new.target.hash string

hash

type
changes.new.target.type string

type

parents
changes.new.target.parents array of object

parents

type
changes.new.target.parents.type string

type

href
changes.new.target.parents.links.html.href string

href

href
changes.new.target.parents.links.self.href string

href

hash
changes.new.target.parents.hash string

hash

href
changes.new.target.links.html.href string

href

href
changes.new.target.links.self.href string

href

name
changes.new.name string

name

href
changes.new.links.commits.href string

href

href
changes.new.links.html.href string

href

href
changes.new.links.self.href string

href

truncated
changes.truncated boolean

Indicate whether Bitbucket truncated the commits array in this payload.

closed
changes.closed boolean

Indicate whether the reference is old.

commits
changes.commits array of object

commits

raw
changes.commits.author.raw string

raw

date
changes.commits.date date-time

date

message
changes.commits.message string

message

hash
changes.commits.hash string

hash

type
changes.commits.type string

type

parents
changes.commits.parents array of object

parents

type
changes.commits.parents.type string

type

href
changes.commits.parents.links.html.href string

href

href
changes.commits.parents.links.self.href string

href

hash
changes.commits.parents.hash string

hash

forced
changes.forced boolean

Indicate whether the push was forced.

Repository

Name Path Type Description
display name
owner.display_name string

The display name of the owner.

type
owner.type string

The type of owner.

username
owner.username string

The username of the owner.

UUID
owner.uuid string

The universally unique identifier of the owner.

name
name string

The name of the repository.

SCM
scm string

The source control manager of the repository.

website
website string

The website of the repository.

UUID
uuid string

The universally unique identifier of the repository.

full name
full_name string

The full name of the repository.

is private
is_private boolean

A boolean indicating if the repository is private.

type
type string

The type of the repository.