Java API

The Bitbucket Data Center Java API is split up into multiple modules, each of which export various classes and services that can be consumed by plugins. Each module is published as a separate maven artifact each Bitbucket Data Center release, with a version number matching the Bitbucket Data Center release number.

Javadoc

Bitbucket Data Center API

Provides a collection of services, events and utility classes for interacting with core Bitbucket features such as server administration, projects, repositories, pull requests and user management.

Bitbucket Data Center SPI

Provides a number of plugin module interfaces, module descriptor classes and utilities that plugins can use to extend Bitbucket's stock functionality. See Plugin Module Types for more details of specific modules that can be implemented.

Branches

Services exported by this plugin that provide extended branch information and enable advanced branch management, such as programmatically creating branches and setting up branching models.

Builds

Since 7.4.0 the builds functionality has moved into the core Bitbucket Data Center API

Code Insights

Provides an API to create, modify and delete code insight reports and annotations. See this how-to guide for more details.

Comment Likes

Provides an API to add and remove comment likes, as well as query for users who have liked comments.

Emoticons

Provides an API to find and get emoticons.

Git

Provides a collection of richly typed command builders for easily invoking native git commands on repositories hosted in Bitbucket.

GPG

Provides an API for finding and managing GPG keys for users.

Jira

Services exported by this plugin to query the set of Jira issues linked to individual commits.

Ref Restrictions

Services exported by this plugin to query and set the branch permissions on a repository.

Repository Ref Sync

Provides an API for enabling and getting the status of synchronizing repositories.

SCM Common

Provides common utilities for dealing with SCMs.

Provides an API for querying information about the search server the application is connected to.

SSH

Services exported by this plugin to query and set the SSH server configuration and users SSH keys.

Suggested Reviewers

Provides an API for getting suggested reviewers for a pull request.

Web Common

Provides common Web Fragment Conditions you can use to control when your Web Fragments appear.

Importing in Maven

Add the following dependencies to your pom.xml

Bitbucket Data Center API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Bitbucket Data Center SPI

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-spi</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Git API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-git-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Build API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-build-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Branch API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-branch-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Code Insights API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-code-insights-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Code Insights SPI

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-code-insights-spi</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Comment Likes

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-comment-likes-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Emoticons API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-emoticons-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Emoticons SPI

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-emoticons-spi</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

GPG API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-gpg-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Jira Integration

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-jira-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Ref Restriction API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-ref-restriction-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Ref Restriction SPI

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-ref-restriction-spi</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Repository Ref Sync API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-repository-ref-sync-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Search API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-search-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

SSH Support

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-ssh-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Suggest Reviewers API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-suggest-reviewers-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Suggest Reviewers SPI

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-suggest-reviewers-spi</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

SCM Common

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-scm-common</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Web Fragment Conditions

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-web-common</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Webhooks API

1
2
<dependency>
    <groupId>com.atlassian.bitbucket.server</groupId>
    <artifactId>bitbucket-webhooks-api</artifactId>
    <scope>provided</scope>
    <version>${bitbucket.version}</version>
</dependency>

Rate this page: