BitBucket

Version control repository hosting service

Go to site
Explore
/
Apps
/
BitBucket

BitBucket API Integrations

Build and run workflows using the BitBucket API. Use 1000s of open source triggers and actions across 1000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

With the BitBucket API, you can programmatically interact with BitBucket, via REST calls. This allows you to build apps and integrations on top of BitBucket, customize and automate your workflows, and much more.

Here are some examples of what you can build with the BitBucket API:

  • Build integrations with 3rd party applications, such as CI/CD tools, chat applications, etc.
  • Create custom workflows and automate tasks
  • Build applications that interact with BitBucket (for example, a tool that helps you find repositories or users)
  • and much more!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    bitbucket: {
      type: "app",
      app: "bitbucket",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://api.bitbucket.org/2.0/user`,
      headers: {
        Authorization: `Bearer ${this.bitbucket.$auth.oauth_access_token}`,
      },
    })
  },
})
Creates a new issue with BitBucket API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + BitBucket
 
Try it
Send Message (Advanced) with Discord Webhook API on New Branch (Instant) from BitBucket API
BitBucket + Discord Webhook
 
Try it
Add Multiple Rows with Google Sheets API on New Branch (Instant) from BitBucket API
BitBucket + Google Sheets
 
Try it
Creates a new issue with BitBucket API on New Item in Feed from RSS API
RSS + BitBucket
 
Try it
Creates a new issue with BitBucket API on New Message from Discord API
Discord + BitBucket
 
Try it
New Commit (Instant) from the BitBucket API

Emit new event when a new commit is pushed to a branch. See docs here

 
Try it
New Pull Request (Instant) from the BitBucket API

Emit new event when a new pull request is created in a repository. See docs here

 
Try it
New Branch (Instant) from the BitBucket API

Emit new event when a new branch is created. See docs here

 
Try it
New Commit Comment (Instant) from the BitBucket API

Emit new event when a commit receives a comment. See docs here

 
Try it
New Event from any Repository from the BitBucket API

Emit new event when an event occurs from any repository belonging to the user. See docs here

 
Try it
Create Issue Comment with the BitBucket API

Creates a new issue comment. See docs here

 
Try it
Create Snippet Comment with the BitBucket API

Creates a new snippet comment. See docs here

 
Try it
Creates a new issue with the BitBucket API

Creates a new issue. See docs here

 
Try it
Get File From Repository with the BitBucket API

Gets the actual file contents of a download artifact and not the artifact's metadata. See docs here

 
Try it
Get issue with the BitBucket API

Get a issue. See docs here

 
Try it

Authentication

BitBucket uses OAuth authentication. When you connect your BitBucket account, Pipedream will open a popup window where you can sign into BitBucket and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any BitBucket API.

Pipedream requests the following authorization scopes when you connect your account:

accountaccount:writeteam:writerepository:writepullrequest:writesnippet:writeissue:writeemailwikiwebhook
OAuth Request Configurations:
  1. authorization
    GEThttps://bitbucket.org/site/oauth2/authorize?client_id={{oauth.client_id}}&state={{oauth.state}}&redirect_uri={{oauth.redirect_uri}}&response_type=code&scope={{oauth.space_separated_scopes}}
  2. accessToken
    POSThttps://bitbucket.org/site/oauth2/access_tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=authorization_code&code={{oauth.code}}&redirect_uri={{oauth.redirect_uri}}
  3. refreshToken
    POSThttps://bitbucket.org/site/oauth2/access_tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{oauth.client_id}}&client_secret={{oauth.client_secret}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}