---
title: "Returns the branch mappings for this repository."
method: GET
path: "/projects/{projectKey}/repos/{repositorySlug}/branch-mappings"
tags: ["Branch mappings"]
---

# Returns the branch mappings for this repository.

`GET /projects/{projectKey}/repos/{repositorySlug}/branch-mappings`

## Path parameters

- `projectKey` string, required
- `repositorySlug` string, required

## Response `200`

Branch mappings found

- RestBranchMappings
  - `branchMappings` BranchMapping[], required
    - `branchFrom` string — The branch name you want to branch from when a new branch is created for the chosen JIRA project and issue type.
    - `branchNameStrategy` 'BRANCH_TYPE' | 'FLEXIBLE_BRANCH_NAME' — The strategy to use for building branch names. Either BRANCH_TYPE or FLEXIBLE_BRANCH_NAME
    - `branchNameTemplate` string — Variables you can use: $issueKey, $fixVersion, $component, $issueSummary, $parentIssueKey. Example: $component/$fixVersion/$issueType/$issueKey-$issueSummary resulting in backend/1.0/bugfix/BRANCHWIZ-12-flexible-branch-strategy
    - `branchType` 'FEATURE' | 'RELEASE' | 'CUSTOM' | 'HOTFIX' | 'BUGFIX' — The branch type you want to use for the chosen JIRA project and issue type.
    - `customBranchPrefix` string — The prefix for custom branches, e.g. 'security-fixes'. The plug-in will append the JIRA issue key to the branch name, resulting in branch names like 'security-fixes/MYPROJ-123-CSRF-problem'.
    - `duplications` string — List of repositories that use the same branch mappings as this one.
    - `id` integer — ID of the branch mapping. Only necessary when updating a mapping.
    - `jiraComponentId` integer — The JIRA component for this branch mapping. This allows you to assign different repositories for different components of the same JIRA project.
    - `jiraIssueTypeId` integer — The JIRA issue type ID for this branch mapping. Whenever a branch is created from this JIRA project and issue type, the chosen branch type and branch from values below are filled in by the plug-in.
    - `jiraProjectKey` string — The JIRA project key that belongs to this repository. You can have multiple mappings with different JIRA projects for the same repository.
    - `overrideBranchFrom` boolean — true if you want to override the branch from value (otherwise, the default branch for the repository is taken).
    - `removeJiraIssueSummary` boolean — By default Bitbucket adds the JIRA issue key and the summary to the branch name. If you enable this option, only the JIRA issue key will be used.

## Other responses

- `401` — The currently authenticated user does not have REPO_ADMIN credentials
- `404` — Project or Repository not found

---

[API](https://skmtc.net/mibexsoftware/apis/create-branch-wizard-for-bitbucket-server-rest-api.md) · [All operations](https://skmtc.net/mibexsoftware/apis/create-branch-wizard-for-bitbucket-server-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mibexsoftware/create-branch-wizard-for-bitbucket-server-rest-api/versions/959aba36c5b3/schema)
