# Bitbucket

## Overview

Bitbucket is a platform for hosting and versioning code, facilitating collaboration among developers. Leverage the power of Bitbucket's vast repository data within Rely.io for a comprehensive view of your software lifecycle.

## Installation Guide

### Required permissions

During the configuration process, you'll be asked to authorize the [Rely.io](http://rely.io/) App to have specific permissions in your account for the plugin to function properly:\
\
**Read**

<table data-header-hidden><thead><tr><th></th><th width="285"></th><th></th></tr></thead><tbody><tr><td>✅ Account</td><td>✅ Issues</td><td>✅ Build Pipelines</td></tr><tr><td>✅ Project</td><td>✅ Repositories</td><td>✅ Pull Requests</td></tr><tr><td>✅ Team Membership</td><td></td><td></td></tr></tbody></table>

{% hint style="info" %}
The necessary permission scopes will be automatically filled in for you so you don't have to worry about that.&#x20;
{% endhint %}

### Steps to Integrate Bitbucket with Rely.io

1. Open the Rely.io platform and start by navigating to the `Plugins` page in the `Portal Builder`.
2. Click the `Add Data Source` button and select `Bitbucket`.
3. You'll be redirected to Bitbucket's app integration form, login to your account.
4. Submit the form by providing the necessary permissions
5. You'll be redirected back to Rely.io
6. Provide an expressive name to this integration that allows you to easily identify the source
7. Click `Submit` to finalize the integration.

{% hint style="info" %}
To prevent pulling outdated or stale data from your tools and flooding your catalog with unactionable entities, our plugins are set by default with policies to reduce noise.

For instance in the case of Git providers:

* Repositories with no activity over the last 3 months are ignored
* Repositories that have been archived are also ignored
* All entities related to ignored repositories (Pull Requests, Issues, Deployments, etc.) are consequently ignored
  {% endhint %}

After you add the Bitbucket plugin, an entity discovery run will be triggered. The initial discovery run can take up to a few minutes. By the end of this discovery run:

* New blueprints will be added to your data model
* Entities retrieved from the data source will be added to the [Discovery](https://webapp.rely.io/data-model/discovery) page for you to either approve or reject them

{% hint style="info" %}
The plugin periodically updates all retrieved entities to ensure they stay in sync with their external counterparts.
{% endhint %}

Once the initial discovery run completes successfully you should see your GitLab plugin under the `Active` section of the `data sources` page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rely.io/plugins-and-automation/plugin-installation-guides/bitbucket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
