Bitbucket

Developer tools Atlassian email and API token

Read repositories, manage pull requests and issues, and run pipelines on Bitbucket Cloud from any Windmill script, flow or app.

Set up in 3 steps

1

Create an API token

At id.atlassian.com/manage-profile/security/api-tokens, choose Create API token with scopes and pick Bitbucket. Tick only the scopes your scripts need, and copy the token — it is shown only once.

2

Add the resource in Windmill

Open Resources, add a resource of type bitbucket. username is your Atlassian account email and password is the API token.

3

Run your first script

Fork any script below and read a repository before writing anything.

Scripts

Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.

Submit a script →

Update a task on a pull request

Script bitbucket Verified

Create a task on a pull request

Script bitbucket Verified

Delete a task on a pull request

Script bitbucket Verified

List tasks on a pull request

Script bitbucket Verified

Get a task on a pull request

Script bitbucket Verified

List pull requests

Script bitbucket Verified

Create a commit by uploading a file

Script bitbucket Verified

Run a pipeline

Script bitbucket Verified

Get file or directory contents

Script bitbucket Verified

Update a snippet

Script bitbucket Verified

Create a snippet

Script bitbucket Verified

Get a snippet

Script bitbucket Verified

List a pull request activity log

Script bitbucket Verified

Get a tag

Script bitbucket Verified

Check if current user is watching a issue

Script bitbucket Verified

Create a comment on an issue

Script bitbucket Verified

Update an explicit user permission for a repository

Script bitbucket Verified

Delete a report

Script bitbucket Verified

Get log file for a step

Script bitbucket Verified

Update the branching model config for a project

Script bitbucket Verified

Get a pull request

Script bitbucket Verified

Check if the current user is watching a snippet

Script bitbucket Verified

List explicit user permissions for a repository

Script bitbucket Verified

Delete a download artifact

Script bitbucket Verified

Get a known host

Script bitbucket Verified

Delete a SSH key

Script bitbucket Verified

Get a webhook for a repository

Script bitbucket Verified

Delete an explicit user permission for a repository

Script bitbucket Verified

List commits on a pull request

Script bitbucket Verified

Get the diff stat for a pull request

Script bitbucket Verified

Trigger flows from Bitbucket

Bitbucket is not only a destination. These inbound paths are supported today.

New pull requests, issues, commits and more (scheduled poll)

Seven trigger scripts (New Pull Request, New Issue, New Commit, New Commit Comment, New Branch, New Pipeline Event, New Repository) each return what appeared since their last run. In a flow, add a trigger, choose Scheduled Poll, and pick the script and an interval. The steps after it run once per new item, and each flow keeps its own cursor.

Resource type

The shape of the credential every script on this page expects.

FieldTypeRequiredWhat it is
passwordstringYesAn Atlassian API token with Bitbucket scopes, from https://id.atlassian.com/manage-profile/security/api-tokens.
usernamestringYesYour Atlassian account email.

Questions

My app password stopped working

Atlassian retired Bitbucket app passwords in favour of API tokens. Create an API token and put your Atlassian account email in username — your Bitbucket username does not work with API tokens on the REST API.

Can I use my account password?

No. The REST API rejects account passwords. Use an API token, which you can scope and revoke without touching your account.

Is my API token stored on the hub?

Never. It lives only in your own Windmill workspace, encrypted at rest.