openapi: 3.1.0
info:
title: Atlassian Admin Account Repositories API
description: The Atlassian Admin API provides programmatic access to manage Atlassian organizations, users, domains, policies, and events. It enables administrators to automate organization management tasks, integrate with identity providers, and ensure appropriate access to Atlassian products.
version: 1.0.0
contact:
name: Atlassian Developer
url: https://developer.atlassian.com/cloud/admin/
license:
name: Atlassian Developer Terms
url: https://developer.atlassian.com/platform/marketplace/atlassian-developer-terms/
x-logo:
url: https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/favicon.png
servers:
- url: https://api.atlassian.com
description: Atlassian Cloud API
security:
- bearerAuth: []
- oauth2: []
tags:
- name: Repositories
paths:
/repositories/{workspace}:
parameters:
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves a paginated list of all repositories within a specified Bitbucket workspace. By making a GET request to the /repositories/{workspace} endpoint, users can access comprehensive information about repositories that belong to a particular workspace, where the workspace parameter in the URL path identifies the target workspace by its slug or UUID. The response includes repository metadata such as names, descriptions, creation dates, visibility settings (public or private), and associated project information. This endpoint supports various query parameters for filtering, sorting, and pagination, allowing developers to efficiently browse through large collections of repositories and integrate repository listings into their applications or workflows. Authentication is required to access private repositories, and the results respect the user's access permissions within the workspace.
summary: Atlassian List Repositories in Workspace
responses:
'200':
description: The repositories owned by the specified account.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repositories'
examples:
paginated-repositories_2:
$ref: '#/components/examples/paginated-repositories_2'
'404':
description: If the specified account does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'410':
description: If the specified account marked as spam.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: role
in: query
description: '
Filters the result based on the authenticated user''s role on each repository.
* **member**: returns repositories to which the user has explicit read access
* **contributor**: returns repositories to which the user has explicit write access
* **admin**: returns repositories to which the user has explicit administrator access
* **owner**: returns all repositories owned by the current user
'
required: false
schema:
type: string
enum:
- admin
- contributor
- member
- owner
- name: q
in: query
description: '
Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
'
required: false
schema:
type: string
- name: sort
in: query
description: "\nField by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).\n "
required: false
schema:
type: string
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: listRepositoriesInWorkspace
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Repositories
description: The Delete Repository operation in the Atlassian Bitbucket Repositories API allows you to permanently remove a repository from a workspace by sending a DELETE request to the `/repositories/{workspace}/{repo_slug}` endpoint. This operation requires you to specify both the workspace identifier and the repository slug in the URL path. Once executed, the repository and all its associated data, including source code, branches, commits, and pull requests, will be irreversibly deleted from Bitbucket. This is a destructive action that typically requires appropriate permissions, such as administrator access to the repository, and should be used with caution as it cannot be undone.
summary: Atlassian Delete Repository
responses:
'204':
description: Indicates successful deletion.
'403':
description: If the caller either does not have admin access to the repository, or the repository is set to read-only.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: redirect_to
in: query
description: 'If a repository has been moved to a new location, use this parameter to
show users a friendly message in the Bitbucket UI that the repository
has moved to a new location. However, a GET to this endpoint will still
return a 404.
'
required: false
schema:
type: string
security:
- oauth2:
- repository:delete
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- delete:repository:bitbucket
operationId: deleteRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Repositories
description: This API operation retrieves detailed information about a specific Bitbucket repository within a workspace by providing the workspace identifier and repository slug as path parameters. When you make a GET request to this endpoint, it returns comprehensive metadata about the repository including its name, description, visibility settings (public or private), creation date, size, language, fork information, owner details, and various URLs for accessing the repository through different protocols. This is useful for applications that need to display repository information, verify repository existence, check permissions, or gather data about a repository before performing other operations on it.
summary: Atlassian Get Repository
responses:
'200':
description: The repository object.
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
repository:
$ref: '#/components/examples/repository'
'403':
description: If the repository is private and the authenticated user does not have access to it.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If no repository exists at this location.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: getRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Repositories
description: This API operation creates a new repository within a specified workspace in Atlassian Bitbucket. By sending a POST request to the endpoint with the workspace identifier and desired repository slug as path parameters, users can programmatically initialize a new repository with configurable settings such as project assignment, description, privacy settings (public or private), and other repository-specific properties passed in the request body. The operation returns the newly created repository object including its UUID, full name, creation timestamp, and links to related resources, making it essential for automated repository provisioning and DevOps workflows that need to dynamically set up version control repositories without manual intervention through the Bitbucket web interface.
summary: Atlassian Create Repository
responses:
'200':
description: The newly created repository.
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
undefined:
$ref: '#/components/examples/undefined'
'400':
description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: If the request was not authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
repository:
$ref: '#/components/examples/repository'
description: The repository that is to be created. Note that most object elements are optional. Elements "owner" and "full_name" are ignored as the URL implies them.
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: createRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
GenerateExampleFromOperationRequestSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: This API operation allows you to update the configuration and settings of an existing repository within a specified workspace in Bitbucket. By sending a PUT request to the endpoint with the workspace ID and repository slug as path parameters, you can modify various repository attributes such as the description, language, visibility (public or private), fork policy, and other metadata. The request body should contain a JSON payload with the fields you wish to update, and authentication is required to ensure the user has appropriate permissions to modify the repository. Upon successful execution, the API returns the updated repository object with all current settings, while failed requests will return appropriate error codes and messages indicating issues such as authentication failures, insufficient permissions, or invalid parameter values.
summary: Atlassian Update Repository
responses:
'200':
description: The existing repository has been updated
headers:
Location:
description: 'The location of the repository. This header is only
provided when the repository''s name is changed.'
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
undefined:
$ref: '#/components/examples/undefined'
'201':
description: A new repository has been created
headers:
Location:
description: The location of the newly created repository
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
'400':
description: If the input document was invalid, or if the caller lacks the privilege to create repositories under the targeted account.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: If the request was not authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
update-repository:
$ref: '#/components/examples/update-repository'
description: 'The repository that is to be updated.
Note that the elements "owner" and "full_name" are ignored since the
URL implies them.
'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: updateRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationRequestSchema: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/branching-model:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves the branching model configuration for a specific Bitbucket repository within a given workspace. By making a GET request to the endpoint with the appropriate workspace identifier and repository slug, it returns details about the repository's branching strategy, including information about production, development, and feature branch configurations, as well as any custom branch prefixes and patterns that have been defined. This is particularly useful for understanding how a team has structured their Git workflow, whether they're using Git Flow, trunk-based development, or a custom branching strategy, and helps developers and automation tools align with the repository's established branching conventions.
summary: Atlassian Get the Branching Model for Repository
responses:
'200':
description: The branching model object
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model'
examples:
branching-model_2:
$ref: '#/components/examples/branching-model_2'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have read access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: getTheBranchingModelForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/branching-model/settings:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves the branching model configuration settings for a specific repository within an Atlassian Bitbucket workspace. By making a GET request to the endpoint with the workspace identifier and repository slug as path parameters, users can access the repository's configured branching strategy, which may include settings for development branches, production branches, branch prefixes, and other workflow-related configurations that govern how branches are created and managed within that repository. This information is useful for understanding the repository's branching conventions and automating branch creation processes according to the established model.
summary: Atlassian Get the Branching Model Config for Repository
responses:
'200':
description: The branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model_settings'
examples:
branching-model-settings_2:
$ref: '#/components/examples/branching-model-settings_2'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have admin access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: getTheBranchingModelConfigForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: This PUT operation updates the branching model configuration settings for a specific Bitbucket repository within a workspace. By sending a request to this endpoint with the workspace identifier and repository slug, administrators can modify how the repository handles branch types, naming conventions, and workflow patterns such as Git Flow or trunk-based development. The operation allows teams to enforce consistent branching strategies across their codebase by configuring settings for development branches, production branches, branch prefixes, and automated merge behaviors. This is particularly useful for organizations that want to standardize their Git workflow and ensure all team members follow the same branching conventions when creating feature branches, release branches, or hotfix branches within the repository.
summary: Atlassian Update the Branching Model Config for Repository
responses:
'200':
description: The updated branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/branching_model_settings'
examples:
branching-model-settings_2:
$ref: '#/components/examples/branching-model-settings_2'
'400':
description: If the request contains invalid branching model configuration
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have admin access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: updateTheBranchingModelConfigForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: target_username
in: path
description: 'This can either be the username or the UUID of the default reviewer,
surrounded by curly-braces, for example: `{account UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Repositories
description: This API operation removes a specific user from the default reviewers list for a Bitbucket repository within a given workspace. When executed, it sends a DELETE request to the endpoint using the workspace identifier, repository slug, and the target username of the reviewer to be removed. Once successfully completed, the specified user will no longer be automatically added as a reviewer on new pull requests created in that repository. This is useful for managing team permissions and workflow automation when team members change roles or leave projects, allowing repository administrators to maintain accurate default reviewer configurations without affecting existing pull requests.
summary: Atlassian Remove User From the Default Reviewers
responses:
'204':
description: The specified user successfully removed from the default reviewers
'403':
description: If the authenticated user does not have access modify the default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the specified user does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: removeUserFromTheDefaultReviewers
x-api-evangelist-processing:
WriteDescription: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/deploy-keys:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves a paginated list of all deploy keys that have been configured for a specific Bitbucket repository within a workspace. Deploy keys are SSH keys that grant read-only or read-write access to a single repository, commonly used for automated deployment processes or CI/CD pipelines. By sending a GET request to this endpoint with the appropriate workspace identifier and repository slug, authenticated users can view all deploy keys associated with that repository, including details such as the key's label, public key value, creation date, and access permissions, enabling repository administrators to audit and manage automated access to their codebase.
summary: Atlassian List Repository Deploy Keys
responses:
'200':
description: Deploy keys matching the repository
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_deploy_keys'
examples:
paginated-deploy-keys:
$ref: '#/components/examples/paginated-deploy-keys'
'403':
description: If the specified user or repository is not accessible to the current user
'404':
description: If the specified user or repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- repository:admin
- basic: []
- api_key: []
operationId: listRepositoryDeployKeys
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Repositories
description: This API operation allows you to add a new deploy key to a specific Bitbucket repository within a workspace. Deploy keys are SSH keys that grant read-only or read-write access to a repository, typically used for automated deployment processes or CI/CD pipelines. By making a POST request to this endpoint with the workspace identifier and repository slug, along with the required key details in the request body (such as the SSH public key and an optional label), you can programmatically register a new deploy key that will enable secure, automated access to the repository without requiring user credentials.
summary: Atlassian Add Repository Deploy Key
responses:
'200':
description: The deploy key that was created
content:
application/json:
schema:
$ref: '#/components/schemas/deploy_key'
examples:
deploy-key:
$ref: '#/components/examples/deploy-key'
'400':
description: Invalid deploy key inputs
'403':
description: If the specified user or repository is not accessible to the current user
'404':
description: If the specified user or repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- repository:admin
- basic: []
- api_key: []
operationId: addRepositoryDeployKey
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/deploy-keys/{key_id}:
parameters:
- name: key_id
in: path
description: The key ID matching the deploy key.
required: true
schema:
type: string
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Repositories
description: This API operation removes a specific deploy key from a Bitbucket repository by sending a DELETE request to the endpoint with the workspace identifier, repository slug, and deploy key ID as path parameters. Deploy keys are SSH keys that grant read-only or read-write access to a repository, typically used for automated deployment processes or CI/CD pipelines. When this operation is executed successfully, it permanently deletes the specified deploy key from the repository, revoking any access that was previously granted through that key. This is useful for security management, such as when rotating keys, removing access for deprecated deployment systems, or cleaning up unused authentication credentials. The operation requires appropriate permissions on the repository to manage deploy keys.
summary: Atlassian Delete Repository Deploy Key
responses:
'204':
description: The key has been deleted
'403':
description: If the current user does not have permission to delete a key for the specified user
'404':
description: If the specified user, repository, or deploy key does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- repository:admin
- basic: []
- api_key: []
operationId: deleteRepositoryDeployKey
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Repositories
description: This API operation retrieves detailed information about a specific deploy key that has been added to a Bitbucket repository. By providing the workspace identifier, repository slug, and the unique key ID, you can fetch the complete configuration and metadata associated with that particular SSH deploy key, including its label, the actual public key content, creation timestamp, and access permissions. Deploy keys are typically used to grant read-only or read-write access to repositories for automated deployment systems and CI/CD pipelines without requiring a user account, and this endpoint allows administrators to verify and audit the deploy keys currently configured for their repository.
summary: Atlassian Get Repository Deploy Key
responses:
'200':
description: Deploy key matching the key ID
content:
application/json:
schema:
$ref: '#/components/schemas/deploy_key'
examples:
deploy-key_2:
$ref: '#/components/examples/deploy-key_2'
'403':
description: If the specified user or repository is not accessible to the current user
'404':
description: If the specified user or repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- repository:admin
- basic: []
- api_key: []
operationId: getRepositoryDeployKey
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: This API operation updates an existing deploy key for a specific repository in Bitbucket by making a PUT request to the endpoint with the workspace ID, repository slug, and deploy key ID as path parameters. Deploy keys are SSH keys that provide read-only or read-write access to a single repository, commonly used for automated deployment processes or CI/CD pipelines. The operation allows you to modify properties of an existing deploy key such as its label, the actual key value, or access permissions, enabling administrators to maintain and update deployment credentials without having to delete and recreate them. Authentication is required to perform this operation, and the user must have administrative permissions on the repository to successfully update deploy key configurations.
summary: Atlassian Update Repository Deploy Key
responses:
'200':
description: The newly updated deploy key.
content:
application/json:
schema:
$ref: '#/components/schemas/deploy_key'
examples:
deploy-key_2:
$ref: '#/components/examples/deploy-key_2'
'400':
description: If the submitted key or related value is invalid
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the current user does not have permission to add a key for the specified user
'404':
description: If the specified user, repository, or deploy key does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- repository:admin
- basic: []
- api_key: []
operationId: updateRepositoryDeployKey
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/effective-branching-model:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves the effective branching model currently applied to a specific Bitbucket repository within a given workspace. By providing the workspace identifier and repository slug as path parameters, it returns the active branching model configuration that governs how branches are organized and managed in that repository, including details about production branches, development branches, and any branch prefixes or patterns that are in use. This is particularly useful for understanding the workflow strategy implemented for the repository, whether it follows Git Flow, trunk-based development, or a custom branching strategy, and helps developers align their work with the established branch management conventions.
summary: Atlassian Get the Effective, or Currently Applied, Branching Model for Repository
responses:
'200':
description: The effective branching model object
content:
application/json:
schema:
$ref: '#/components/schemas/effective_repo_branching_model'
examples:
effective-repository-branching-model:
$ref: '#/components/examples/effective-repository-branching-model'
'401':
description: If the request was not authenticated
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have read access to the repository
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repositoryBitbucket
operationId: getTheEffective,OrCurrentlyApplied,BranchingModelForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/forks:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves a paginated list of all forks that have been created from a specific Bitbucket repository. By making a GET request to the endpoint with the workspace identifier and repository slug as path parameters, users can view all derivative repositories that have been forked from the original. The response typically includes details about each fork such as the fork's owner, creation date, repository metadata, and links to access the forked repositories. This is useful for repository maintainers who want to track how their code is being used and extended by the community, or for developers looking to discover active forks that may contain interesting modifications or improvements to the original codebase.
summary: Atlassian List Repository Forks
responses:
'200':
description: All forks.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repositories'
examples:
paginated-repositories_2:
$ref: '#/components/examples/paginated-repositories_2'
parameters:
- name: role
in: query
description: 'Filters the result based on the authenticated user''s role on each repository.
* **member**: returns repositories to which the user has explicit read access
* **contributor**: returns repositories to which the user has explicit write access
* **admin**: returns repositories to which the user has explicit administrator access
* **owner**: returns all repositories owned by the current user
'
required: false
schema:
type: string
enum:
- admin
- contributor
- member
- owner
- name: q
in: query
description: 'Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
'
required: false
schema:
type: string
- name: sort
in: query
description: 'Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
'
required: false
schema:
type: string
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: listRepositoryForks
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Repositories
description: This API operation creates a fork of an existing Bitbucket repository within a specified workspace. By sending a POST request to the endpoint with the workspace identifier and repository slug, users can duplicate the repository into their own account or another workspace they have access to. The forked repository maintains a connection to the original source repository, allowing users to track changes and potentially submit pull requests back to the parent repository. This functionality is commonly used for contributing to open-source projects, creating experimental branches without affecting the original codebase, or maintaining personal copies of repositories for customization purposes.
summary: Atlassian Fork Repository
responses:
'201':
description: The newly created fork.
headers:
Location:
description: The URL of the newly created fork
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
repository_2:
$ref: '#/components/examples/repository_2'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/repository'
examples:
repository_2:
$ref: '#/components/examples/repository_2'
description: A repository object. This can be left blank.
security:
- oauth2:
- repository:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- write:repository:bitbucket
operationId: forkRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationRequestSchema: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/hooks:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: The Get List Webhooks For Repository operation in the Atlassian Bitbucket Repositories API allows you to retrieve a paginated list of all webhooks configured for a specific repository within a workspace. By making a GET request to the /repositories/{workspace}/{repo_slug}/hooks endpoint, where {workspace} is the workspace ID or slug and {repo_slug} is the repository identifier, you can view all webhook subscriptions that have been set up to notify external services when specific events occur in the repository, such as push events, pull request updates, or issue changes. The response includes details about each webhook, including its unique identifier, URL endpoint, description, active status, and the events it's subscribed to, making it useful for auditing integrations, managing webhook configurations, or troubleshooting event notifications.
summary: Atlassian List Webhooks for Repository
responses:
'200':
description: The paginated list of installed webhooks.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_webhook_subscriptions'
examples:
paginated-webhook-subscriptions:
$ref: '#/components/examples/paginated-webhook-subscriptions'
'403':
description: If the authenticated user does not have permission to access the webhooks.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- webhook
- basic: []
- api_key: []
operationId: listWebhooksForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Repositories
description: This API operation creates a new webhook for a specific Bitbucket repository within a workspace. When invoked via POST request to the endpoint /repositories/{workspace}/{repo_slug}/hooks, it allows you to configure automated notifications that trigger HTTP callbacks to a specified URL whenever certain events occur in the repository, such as push events, pull request updates, or issue changes. The workspace parameter identifies the Bitbucket workspace (formerly team), while repo_slug specifies the repository identifier. The request typically requires authentication and a JSON payload defining the webhook configuration, including the target URL, events to monitor, and optional settings like active status and description. Upon successful creation, the API returns the webhook details including a unique identifier that can be used for subsequent management operations like updates or deletion.
summary: Atlassian Create Webhook for Repository
responses:
'201':
description: If the webhook was registered successfully.
headers:
Location:
description: The URL of new newly created webhook.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_subscription'
examples:
webhook-subscription:
$ref: '#/components/examples/webhook-subscription'
'403':
description: If the authenticated user does not have permission to install webhooks on the specified repository.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- webhook
- basic: []
- api_key: []
operationId: createWebhookForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/hooks/{uid}:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: uid
in: path
description: Installed webhook's ID
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Repositories
description: Deletes a specific webhook from a Bitbucket repository by removing the webhook configuration identified by its unique identifier (uid) from the specified repository within a workspace. This operation requires the workspace slug, repository slug, and the webhook's unique ID as path parameters, and upon successful execution, permanently removes the webhook so it will no longer trigger for repository events. Authentication with appropriate permissions is required to perform this destructive action, and the deletion cannot be undone through the API.
summary: Atlassian Delete Webhook for Repository
responses:
'204':
description: When the webhook was deleted successfully
'403':
description: If the authenticated user does not have permission to delete the webhook.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the webhook or repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- webhook
- basic: []
- api_key: []
operationId: deleteWebhookForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Repositories
description: This API operation retrieves details about a specific webhook configured for a Bitbucket repository. By providing the workspace identifier, repository slug, and unique webhook ID (uid) in the endpoint path, users can fetch comprehensive information about that particular webhook including its URL, events it subscribes to, configuration settings, and current status. This GET request is useful for inspecting existing webhook configurations, verifying webhook properties, or retrieving webhook details before performing update or delete operations. The response returns a complete webhook object containing all its attributes and settings as configured for the specified repository.
summary: Atlassian Get Webhook for Repository
responses:
'200':
description: The webhook subscription object.
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_subscription'
examples:
webhook-subscription_2:
$ref: '#/components/examples/webhook-subscription_2'
'404':
description: If the webhook or repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- webhook
- basic: []
- api_key: []
operationId: getWebhookForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: Updates an existing webhook subscription for a repository in Bitbucket by modifying its configuration properties such as the URL endpoint, description, active status, and event triggers. The operation requires specifying the workspace, repository slug, and the unique identifier (uid) of the webhook to be updated. This allows repository administrators to reconfigure webhook behavior, change the destination URL where events are sent, enable or disable the webhook, or modify which repository events (such as push, pull request, or issue events) trigger the webhook notifications without needing to delete and recreate the subscription.
summary: Atlassian Update Webhook for Repository
responses:
'200':
description: The webhook subscription object.
content:
application/json:
schema:
$ref: '#/components/schemas/webhook_subscription'
examples:
webhook-subscription_2:
$ref: '#/components/examples/webhook-subscription_2'
'403':
description: If the authenticated user does not have permission to update the webhook.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the webhook or repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- webhook
- basic: []
- api_key: []
operationId: updateWebhookForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/issues/{issue_id}:
parameters:
- name: issue_id
in: path
description: The issue id
required: true
schema:
type: string
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
put:
tags:
- Repositories
description: This PUT operation updates an existing issue within a specified Bitbucket repository by making a request to the endpoint with the workspace ID, repository slug, and issue ID as path parameters. The operation allows you to modify various attributes of an issue such as its title, description, status, priority, kind, component, milestone, version, or assignee by sending the updated fields in the request body. Only the fields included in the request payload will be modified, while omitted fields remain unchanged, following a partial update pattern. The endpoint requires appropriate authentication and permissions to modify issues in the repository, and upon successful execution, it returns the updated issue object with all its current attributes including any system-generated metadata like timestamps and version information.
summary: Atlassian Update an Issue
responses:
'200':
description: The updated issue object.
content:
application/json:
schema:
$ref: '#/components/schemas/issue'
examples:
issue_2:
$ref: '#/components/examples/issue_2'
'403':
description: When the authenticated user isn't authorized to access the issue.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The specified repository or issue does not exist or does not have the issue tracker enabled.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- issue:write
- basic: []
- api_key: []
operationId: updateAnIssue
x-api-evangelist-processing:
WriteDescription: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/override-settings:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves the inheritance state configuration for settings within a specific Bitbucket repository. By making a GET request to the endpoint with the workspace identifier and repository slug, you can determine which repository settings are being inherited from the project level versus those that have been explicitly overridden at the repository level. This is particularly useful for administrators who need to understand the configuration hierarchy and manage settings inheritance across their Bitbucket workspace, allowing them to see which settings are using default project values and which have custom repository-specific configurations applied.
summary: Atlassian Retrieve the Inheritance State for Repository Settings
responses:
'200':
description: The repository setting inheritance state
content:
application/json:
schema:
$ref: '#/components/schemas/repository_inheritance_state'
examples:
repository-inheritance-state:
$ref: '#/components/examples/repository-inheritance-state'
'404':
description: If no repository exists at this location
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: retrieveTheInheritanceStateForRepositorySettings
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: This API operation allows administrators to configure the inheritance behavior of settings for a specific Bitbucket repository within a workspace. By making a PUT request to this endpoint, users can control whether repository settings should inherit values from the project or workspace level, or use custom overrides specific to that repository. This is particularly useful in organizations that want to enforce certain settings across multiple repositories while allowing selective customization for specific repos. The operation requires specification of both the workspace identifier and the repository slug in the URL path, and the request body typically contains the inheritance configuration that determines which settings should be inherited and which should be overridden at the repository level.
summary: Atlassian Set the Inheritance State for Repository Settings
responses:
'204':
description: The repository setting inheritance state was set and no content returned
'404':
description: If no repository exists at this location
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: setTheInheritanceStateForRepositorySettings
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/permissions-config/groups:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves a paginated list of all explicit group permissions that have been configured for a specific Bitbucket repository within a workspace. It returns permission configurations that directly grant access to groups at the repository level, as opposed to inherited or default permissions. The endpoint requires both the workspace identifier and repository slug to be specified in the URL path, and it returns details about which groups have been explicitly granted permissions to access or interact with the repository, along with the specific permission levels assigned to each group.
summary: Atlassian List Explicit Group Permissions for Repository
responses:
'200':
description: Paginated of explicit group permissions on the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repository_group_permissions'
examples:
paginated-repository-group-permissions:
$ref: '#/components/examples/paginated-repository-group-permissions'
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: One or both of the workspace and repository doesn't exist for the given identifiers.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- read:user:bitbucket
operationId: listExplicitGroupPermissionsForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/permissions-config/groups/{group_slug}:
parameters:
- name: group_slug
in: path
description: Slug of the requested group.
required: true
schema:
type: string
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Repositories
description: This API operation removes an explicitly granted permission for a specific group from a Bitbucket repository. It targets a particular group identified by its slug within a repository (specified by workspace and repository slug) and deletes the permission configuration that was directly assigned to that group. This endpoint is useful when you need to revoke repository access rights that were previously granted to a team or group, requiring authentication and appropriate administrative privileges. The operation uses the DELETE HTTP method and returns a success status when the group permission is successfully removed from the repository's access control list.
summary: Atlassian Delete an Explicit Group Permission for Repository
responses:
'204':
description: Group permission deleted
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The workspace does not exist, the repository does not exist, or the group does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
operationId: deleteAnExplicitGroupPermissionForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Repositories
description: This API operation retrieves explicit permission settings assigned to a specific group for a given repository in Bitbucket. By providing the workspace identifier, repository slug, and group slug as path parameters, it returns detailed information about the permission level that has been directly granted to that group for accessing and managing the specified repository. This is useful for administrators who need to audit or verify group-level access controls, as it shows only explicitly configured permissions rather than inherited or default permissions. The response typically includes the group's identifier, the permission level (such as read, write, or admin), and potentially additional metadata about when and how the permission was assigned.
summary: Atlassian Get an Explicit Group Permission for Repository
responses:
'200':
description: Group permission for group slug and repository
content:
application/json:
schema:
$ref: '#/components/schemas/repository_group_permission'
examples:
repository-group-permission:
$ref: '#/components/examples/repository-group-permission'
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The given user, workspace, and/or repository could not be found
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- read:user:bitbucket
operationId: getAnExplicitGroupPermissionForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: This API operation updates the explicit permission level for a specific group on a Bitbucket repository within a workspace. By sending a PUT request to the endpoint with the workspace identifier, repository slug, and group slug, administrators can modify the access rights granted to that group for the specified repository. The operation allows you to change permission levels such as read, write, or admin access for the group, providing fine-grained control over repository access management. This is particularly useful for managing team permissions and ensuring that user groups have appropriate access levels based on their roles and responsibilities within the organization.
summary: Atlassian Update an Explicit Group Permission for Repository
responses:
'200':
description: Group permission updated
content:
application/json:
schema:
$ref: '#/components/schemas/repository_group_permission'
examples:
repository-group-permission_2:
$ref: '#/components/examples/repository-group-permission_2'
'400':
description: No permission value was provided or the value is invalid(not one of read, write, or admin)
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'402':
description: You have reached your plan's user limit and must upgrade before giving access to additional users.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The workspace does not exist, the repository does not exist, or the group does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
$ref: '#/components/requestBodies/BitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
operationId: updateAnExplicitGroupPermissionForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/permissions-config/users:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves a list of explicit user permissions that have been directly assigned to a specific Bitbucket repository within a given workspace. By making a GET request to the endpoint with the workspace identifier and repository slug as path parameters, it returns detailed information about individual users who have been granted specific permission levels on the repository, excluding permissions inherited through group memberships or workspace-level settings. This is useful for repository administrators who need to audit, review, or manage direct user access controls and understand exactly which users have been explicitly granted permissions such as read, write, or admin access to the repository.
summary: Atlassian List Explicit User Permissions for Repository
responses:
'200':
description: Paginated of explicit user permissions on the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repository_user_permissions'
examples:
paginated-repository-user-permissions:
$ref: '#/components/examples/paginated-repository-user-permissions'
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: No repository exists for the given repository slug and workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- read:user:bitbucket
operationId: listExplicitUserPermissionsForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: selected_user_id
in: path
description: 'This can either be the UUID of the account, surrounded by curly-braces, for
example: `{account UUID}`, OR an Atlassian Account ID.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Repositories
description: 'This API operation removes an explicitly granted permission for a specific user from a Bitbucket repository by sending a DELETE request to the endpoint /repositories/{workspace}/{repo_slug}/permissions-config/users/{selected_user_id}. The operation requires three path parameters: the workspace identifier, the repository slug, and the selected user''s ID whose permission is being revoked. When executed, it deletes the direct permission assignment for that user on the specified repository, meaning the user will no longer have the explicitly granted access level unless they inherit permissions through group membership or workspace-level settings. This is useful for repository administrators who need to revoke individual user access without affecting other users or group-based permissions.'
summary: Atlassian Delete an Explicit User Permission for Repository
responses:
'204':
description: The repository user permission was deleted and no content returned.
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: One or more of the workspace, repository, and user doesn't exist for the given identifiers.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
operationId: deleteAnExplicitUserPermissionForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Repositories
description: This API endpoint retrieves the explicit permission settings for a specific user on a particular Bitbucket repository within a workspace. By providing the workspace identifier, repository slug, and the selected user's ID in the path parameters, it returns detailed information about what level of access (such as read, write, or admin) has been directly granted to that user for the specified repository. This is useful for auditing user permissions, managing repository access control, and understanding who has been explicitly granted permissions rather than inheriting them through group memberships or workspace-level settings.
summary: Atlassian Get an Explicit User Permission for Repository
responses:
'200':
description: Explicit user permission for user and repository
content:
application/json:
schema:
$ref: '#/components/schemas/repository_user_permission'
examples:
repository-user-permission:
$ref: '#/components/examples/repository-user-permission'
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: One or both of the workspace and repository doesn't exist for the given identifiers.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- read:user:bitbucket
operationId: getAnExplicitUserPermissionForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
description: Updates the explicit permission level for a specific user on a Bitbucket repository within a workspace. This operation requires specifying the workspace identifier, repository slug, and the selected user's ID in the endpoint path. The PUT request allows repository administrators to modify access permissions for individual users, setting their level of access (such as read, write, or admin) directly on the repository. This is useful for managing fine-grained access control when you need to grant or modify permissions for specific team members outside of group-based permissions, enabling precise control over who can view, contribute to, or administer the repository.
summary: Atlassian Update an Explicit User Permission for Repository
responses:
'200':
description: Explicit user permission updated
content:
application/json:
schema:
$ref: '#/components/schemas/repository_user_permission'
examples:
repository-user-permission_2:
$ref: '#/components/examples/repository-user-permission_2'
'400':
description: No permission value was provided or the value is invalid (not one of read, write, or admin), or the selected user is not a valid user to update.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: The user couldn't be authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'402':
description: You have reached your plan's user limit and must upgrade before giving access to additional users.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: The requesting user isn't an admin of the repository, or the authentication method was not via app password.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: One or more of the workspace, repository, and selected user doesn't exist for the given identifiers.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
$ref: '#/components/requestBodies/BitbucketAppsPermissionsSerializersRepoPermissionUpdateSchema'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
operationId: updateAnExplicitUserPermissionForRepository
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pipelines_config/variables:
get:
tags:
- Repositories
summary: Atlassian List Variables for Repository
description: This API operation retrieves all pipeline variables configured for a specific Bitbucket repository within a given workspace. By making a GET request to the endpoint with the workspace identifier and repository slug, users can access a complete list of environment variables that are available for use during pipeline executions. These variables typically include configuration settings, credentials, and other key-value pairs that pipelines reference during build, test, and deployment processes. The operation returns variable metadata including names, values (with sensitive values potentially masked), security settings, and whether variables are secured or public. This is useful for auditing pipeline configurations, managing environment-specific settings, and ensuring proper variable setup across different repositories in the workspace.
operationId: listVariablesForRepository
parameters:
- name: workspace
description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
required: true
in: path
schema:
type: string
- name: repo_slug
description: The repository.
required: true
in: path
schema:
type: string
responses:
'200':
description: The retrieved variables.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pipeline_variables'
examples:
paginated-pipeline-variables:
$ref: '#/components/examples/paginated-pipeline-variables'
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pipeline:bitbucket
security:
- oauth2:
- pipeline
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Repositories
summary: Atlassian Create Variable for Repository
description: This API operation creates a new pipeline variable for a specific Bitbucket repository within a workspace. By sending a POST request to the endpoint with the workspace ID and repository slug, users can define custom variables that will be available during pipeline executions. These variables are commonly used to store configuration values, credentials, or environment-specific settings that pipelines need to access during build, test, or deployment processes. The operation requires appropriate authentication and permissions to modify pipeline configurations for the specified repository, and the variable data is typically provided in the request body with properties such as the variable name, value, and whether it should be secured or masked in pipeline logs.
operationId: createVariableForRepository
parameters:
- name: workspace
description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
required: true
in: path
schema:
type: string
- name: repo_slug
description: The repository.
required: true
in: path
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/pipeline_variable'
examples:
pipeline-variable:
$ref: '#/components/examples/pipeline-variable'
description: The variable to create.
required: true
responses:
'201':
description: The variable was created.
headers:
Location:
description: The URL of the newly created pipeline variable.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/pipeline_variable'
examples:
pipeline-variable_2:
$ref: '#/components/examples/pipeline-variable_2'
'404':
description: The account or repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'409':
description: A variable with the provided key already exists.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:pipeline:bitbucket
security:
- oauth2:
- pipeline:variable
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationRequestSchema: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pipelines_config/variables/{variable_uuid}:
get:
tags:
- Repositories
summary: Atlassian Get Variable for Repository
description: This API operation retrieves a specific pipeline variable for a Bitbucket repository by its unique identifier. It requires authentication and access to the specified workspace and repository, using the repository slug and variable UUID as path parameters. The endpoint returns the complete details of the requested pipeline variable, including its name, value, security settings, and other configuration metadata that controls how the variable is used within the repository's CI/CD pipelines.
operationId: getVariableForRepository
parameters:
- name: workspace
description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
required: true
in: path
schema:
type: string
- name: repo_slug
description: The repository.
required: true
in: path
schema:
type: string
- name: variable_uuid
description: The UUID of the variable to retrieve.
required: true
in: path
schema:
type: string
responses:
'200':
description: The variable.
content:
application/json:
schema:
$ref: '#/components/schemas/pipeline_variable'
examples:
pipeline-variable_2:
$ref: '#/components/examples/pipeline-variable_2'
'404':
description: The account, repository or variable with the specified UUID was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pipeline:bitbucket
security:
- oauth2:
- pipeline
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Repositories
summary: Atlassian Update Variable for Repository
description: Updates an existing pipeline variable for a specific repository in Bitbucket, identified by the workspace name, repository slug, and the variable's unique UUID. This operation allows you to modify the variable's properties such as its name, value, security settings (whether it's secured/masked), and other configuration options that control how the variable behaves within the pipeline execution context. The variable can be used across all pipelines in the repository to store configuration values, credentials, or other environment-specific data, and when marked as secured, its value will be hidden in pipeline logs and UI to protect sensitive information.
operationId: updateVariableForRepository
parameters:
- name: workspace
description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
required: true
in: path
schema:
type: string
- name: repo_slug
description: The repository.
required: true
in: path
schema:
type: string
- name: variable_uuid
description: The UUID of the variable to update.
required: true
in: path
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/pipeline_variable'
examples:
pipeline-variable_2:
$ref: '#/components/examples/pipeline-variable_2'
description: The updated variable
required: true
responses:
'200':
description: The variable was updated.
content:
application/json:
schema:
$ref: '#/components/schemas/pipeline_variable'
examples:
pipeline-variable_2:
$ref: '#/components/examples/pipeline-variable_2'
'404':
description: The account, repository or variable with the given UUID was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:pipeline:bitbucket
security:
- oauth2:
- pipeline:variable
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationRequestSchema: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
tags:
- Repositories
summary: Atlassian Delete Variable for Repository
description: Deletes a specific pipeline variable from a Bitbucket repository's configuration by targeting its unique identifier. This operation removes the variable identified by the variable_uuid parameter from the specified repository within the given workspace, permanently eliminating it from the pipeline's environment variables. Once deleted, the variable will no longer be available for use in any pipeline executions for that repository, and this action cannot be undone. The operation requires appropriate permissions on the repository and is commonly used when cleaning up unused variables, removing sensitive information, or managing pipeline configuration changes. Authentication is required, and the workspace, repository slug, and variable UUID must all be provided as path parameters to successfully identify and delete the target variable.
operationId: deleteVariableForRepository
parameters:
- name: workspace
description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example `{workspace UUID}`.
required: true
in: path
schema:
type: string
- name: repo_slug
description: The repository.
required: true
in: path
schema:
type: string
- name: variable_uuid
description: The UUID of the variable to delete.
required: true
in: path
schema:
type: string
responses:
'204':
description: The variable was deleted.
'404':
description: The account, repository or variable with given UUID was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:pipeline:bitbucket
security:
- oauth2:
- pipeline:variable
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/properties/{app_key}/{property_name}:
put:
responses:
'204':
description: An empty response.
operationId: updateRepositoryApplicationProperty
summary: Atlassian Update Repository Application Property
description: Updates an application property value for a specific repository in Bitbucket. This endpoint allows applications to store and modify custom metadata or configuration data associated with a particular repository by specifying the workspace, repository slug, application key, and property name. The operation replaces the existing property value with the new data provided in the request body, enabling applications to maintain persistent, repository-specific settings or state information that can be retrieved and modified as needed throughout the application lifecycle.
parameters:
- required: true
in: path
name: workspace
description: The repository container; either the workspace slug or the UUID in curly braces.
schema:
type: string
- required: true
in: path
name: repo_slug
description: The repository.
schema:
type: string
- required: true
in: path
name: app_key
description: The key of the Connect app.
schema:
type: string
- required: true
in: path
name: property_name
description: The name of the property.
schema:
type: string
requestBody:
$ref: '#/components/requestBodies/application_property'
tags:
- Repositories
security:
- oauth2: []
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
responses:
'204':
description: An empty response.
operationId: deleteRepositoryApplicationProperty
summary: Atlassian Delete Repository Application Property
description: This API operation allows you to delete a specific application property associated with a Bitbucket repository within a given workspace. By sending a DELETE request to the endpoint with the workspace identifier, repository slug, application key, and property name as path parameters, you can remove custom metadata or configuration data that was previously stored against the repository by a specific application. This is particularly useful for cleaning up application-specific settings, removing obsolete configuration values, or managing the lifecycle of properties created by Atlassian Connect apps or other integrations that extend Bitbucket's functionality. The operation requires appropriate permissions to modify repository settings and will permanently remove the specified property from the repository's application property collection.
parameters:
- required: true
in: path
name: workspace
description: The repository container; either the workspace slug or the UUID in curly braces.
schema:
type: string
- required: true
in: path
name: repo_slug
description: The repository.
schema:
type: string
- required: true
in: path
name: app_key
description: The key of the Connect app.
schema:
type: string
- required: true
in: path
name: property_name
description: The name of the property.
schema:
type: string
tags:
- Repositories
security:
- oauth2: []
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
responses:
'200':
description: The value of the property.
content:
application/json:
schema:
$ref: '#/components/schemas/application_property'
examples:
application-property_2:
$ref: '#/components/examples/application-property_2'
operationId: getRepositoryApplicationProperty
summary: Atlassian Get Repository Application Property
description: This API operation retrieves a specific application property stored against a Bitbucket repository within a given workspace. By providing the workspace identifier, repository slug, application key, and property name as path parameters, developers can fetch custom metadata or configuration values that have been previously set by an application for that particular repository. This is useful for applications that need to store and retrieve repository-specific settings or data, such as integration configurations, feature flags, or custom attributes that extend the repository's functionality beyond Bitbucket's native features.
parameters:
- required: true
in: path
name: workspace
description: The repository container; either the workspace slug or the UUID in curly braces.
schema:
type: string
- required: true
in: path
name: repo_slug
description: The repository.
schema:
type: string
- required: true
in: path
name: app_key
description: The key of the Connect app.
schema:
type: string
- required: true
in: path
name: property_name
description: The name of the property.
schema:
type: string
tags:
- Repositories
security:
- oauth2: []
- basic: []
- api_key: []
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/watchers:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: Returns a paginated list of all users watching the specified repository. Authenticated users can use this endpoint to discover who is following updates to a repository, including receiving notifications about commits, pull requests, and issues. The response includes user account information for each watcher. This endpoint supports pagination through standard query parameters to handle repositories with large numbers of watchers. Access requires appropriate repository read permissions, with the level of detail returned depending on the authenticated user's privileges and the repository's visibility settings.
summary: Atlassian List Repositories Watchers
responses:
'200':
description: A paginated list of all the watchers on the specified repository.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_accounts'
examples:
paginated-accounts_2:
$ref: '#/components/examples/paginated-accounts_2'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
operationId: listRepositoriesWatchers
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/workspaces/{workspace}/permissions/repositories/{repo_slug}:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This API operation retrieves all explicit user and group permissions for a specific repository within a given workspace in Bitbucket. By providing the workspace identifier and repository slug as path parameters, it returns a paginated list of permission grants that shows which users and groups have been explicitly granted access to the repository and their respective permission levels (such as read, write, or admin). This is useful for auditing repository access, managing team permissions, and understanding who has what level of access to a particular repository within the workspace, excluding any permissions that might be inherited from workspace-level settings.
summary: Atlassian List Repository Permissions for Workspace
responses:
'200':
description: The repository permission for all users in this repository.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repository_permissions'
examples:
paginated-repository-permissions:
$ref: '#/components/examples/paginated-repository-permissions'
'403':
description: The requesting user isn't an admin of the repository.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: q
in: query
description: '
Query string to narrow down the response as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
required: false
schema:
type: string
- name: sort
in: query
description: '
Name of a response property sort the result by as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
'
required: false
schema:
type: string
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- read:user:bitbucket
operationId: listRepositoryPermissionsForWorkspace
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/teams/{username}/search/code:
get:
tags:
- Repositories
summary: Atlassian Search for Code in Teams Repositories
description: This API operation allows you to search for code across all repositories belonging to a specific team in Bitbucket. By making a GET request to the endpoint with the team's username as a path parameter, you can perform code searches within the team's repository collection. The operation returns matching code snippets and their locations across the team's codebase, making it useful for finding specific code patterns, function definitions, or text strings across multiple repositories owned by the team. This is particularly valuable for organizations that need to audit code, find usage examples, or track specific implementations across their team's projects.
operationId: searchForCodeInTeamsRepositories
parameters:
- name: username
in: path
description: The account to search in; either the username or the UUID in curly braces
required: true
schema:
type: string
- name: search_query
in: query
description: The search query
required: true
schema:
type: string
- name: page
in: query
description: Which page of the search results to retrieve
required: false
schema:
type: integer
format: int32
default: 1
- name: pagelen
in: query
description: How many search results to retrieve per page
required: false
schema:
type: integer
format: int32
default: 10
responses:
'200':
description: Successful search
content:
application/json:
schema:
$ref: '#/components/schemas/search_result_page'
examples:
undefined:
$ref: '#/components/examples/undefined_2'
'400':
description: 'If the search request was invalid due to one of the
following reasons:
* the specified type of target account doesn''''t match the actual
account type;
* malformed pagination properties;
* missing or malformed search query, in the latter case an error
key will be returned in `error.data.key` property.
'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Search is not enabled for the requested team, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'429':
description: Too many requests, try again later
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/user/permissions/repositories:
parameters: []
get:
tags:
- Repositories
description: This API endpoint retrieves a paginated list of repositories for which the authenticated user has explicit permissions in Bitbucket. It returns repository objects along with the specific permission level (read, write, or admin) that the user has been granted for each repository. The response excludes repositories where the user has inherited permissions through team or group membership, focusing only on direct permission assignments. This operation requires authentication and uses a GET request method, making it useful for applications that need to audit or display a Users directly assigned repository access rights across their Bitbucket workspace.
summary: Atlassian List Repository Permissions for User
responses:
'200':
description: Repository permissions for the repositories a caller has explicit access to.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repository_permissions'
examples:
paginated-repository-permissions:
$ref: '#/components/examples/paginated-repository-permissions_2'
parameters:
- name: q
in: query
description: '
Query string to narrow down the response as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
required: false
schema:
type: string
- name: sort
in: query
description: '
Name of a response property sort the result by as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
required: false
schema:
type: string
security:
- oauth2:
- account
- repository
- basic: []
- api_key: []
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
operationId: listRepositoryPermissionsForUser
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/users/{selected_user}/search/code:
get:
tags:
- Repositories
summary: Atlassian Search for Code in Users Repositories
description: The Atlassian Bitbucket User API endpoint `/users/{selected_user}/search/code` accessed via GET method enables developers to perform code searches across all repositories belonging to a specific user. By providing a username in the `{selected_user}` path parameter along with search query parameters, this operation scans through the code content within that user's repositories and returns matching results. This is particularly useful for finding specific code snippets, function names, variables, or any text patterns across a user's entire codebase without needing to search individual repositories separately. The endpoint helps developers quickly locate where certain code elements are used, identify duplicated code, or conduct code audits across a user's portfolio of repositories.
operationId: searchForCodeInUsersRepositories
parameters:
- name: selected_user
in: path
description: Either the UUID of the account surrounded by curly-braces, for example `{account UUID}`, OR an Atlassian Account ID.
required: true
schema:
type: string
- name: search_query
in: query
description: The search query
required: true
schema:
type: string
- name: page
in: query
description: Which page of the search results to retrieve
required: false
schema:
type: integer
format: int32
default: 1
- name: pagelen
in: query
description: How many search results to retrieve per page
required: false
schema:
type: integer
format: int32
default: 10
responses:
'200':
description: Successful search
content:
application/json:
schema:
$ref: '#/components/schemas/search_result_page'
examples:
undefined_2:
$ref: '#/components/examples/undefined_2'
'400':
description: 'If the search request was invalid due to one of the
following reasons:
* the specified type of target account doesn''''t match the actual
account type;
* malformed pagination properties;
* missing or malformed search query, in the latter case an error
key will be returned in `error.data.key` property.
'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: Search is not enabled for the requested user, navigate to [https://bitbucket.org/search](https://bitbucket.org/search) to turn it on
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'429':
description: Too many requests, try again later
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository
- basic: []
- api_key: []
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
CaselCaseOperationIds: true
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/workspaces/{workspace}/permissions/repositories:
parameters:
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
get:
tags:
- Repositories
description: This GET operation retrieves a comprehensive list of all repository permissions configured within a specific Bitbucket workspace. By targeting the /workspaces/{workspace}/permissions/repositories endpoint, it returns permission details for repositories in the specified workspace, allowing administrators and authorized users to audit access controls and understand who has what level of access (read, write, admin) to repositories. The {workspace} path parameter identifies the target workspace, and the response typically includes information about users, groups, and their associated permission levels across all repositories within that workspace scope.
summary: Atlassian List All Repository Permissions for a Workspace
responses:
'200':
description: List of workspace's repository permissions.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repository_permissions'
examples:
paginated-repository-permissions:
$ref: '#/components/examples/paginated-repository-permissions'
'403':
description: The requesting user isn't an admin of the workspace.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: q
in: query
description: '
Query string to narrow down the response as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).'
required: false
schema:
type: string
- name: sort
in: query
description: '
Name of a response property sort the result by as per
[filtering and sorting](/cloud/bitbucket/rest/intro/#sorting-query-results).
'
required: false
schema:
type: string
security:
- oauth2:
- account
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:repository:bitbucket
- read:user:bitbucket
operationId: atlassianListAllRepositoryPermissionsForAWorkspace
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories:
parameters: []
get:
tags:
- Repositories
description: Returns a paginated list of all public repositories.
This endpoint also supports filtering and sorting of the results. See
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
summary: Atlassian List Public Repositories
responses:
'200':
description: All public repositories.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_repositories_3'
parameters:
- name: after
in: query
description: "Filter the results to include only repositories created on or\nafter this [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601)\n timestamp. Example: `YYYY-MM-DDTHH:mm:ss.sssZ`"
required: false
schema:
type: string
- name: role
in: query
description: 'Filters the result based on the authenticated user''s role on each repository.
* **member**: returns repositories to which the user has explicit read access
* **contributor**: returns repositories to which the user has explicit write access
* **admin**: returns repositories to which the user has explicit administrator access
* **owner**: returns all repositories owned by the current user
'
required: false
schema:
type: string
enum:
- admin
- contributor
- member
- owner
- name: q
in: query
description: 'Query string to narrow down the response as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
`role` parameter must also be specified.
'
required: false
schema:
type: string
- name: sort
in: query
description: 'Field by which the results should be sorted as per [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering).
'
required: false
schema:
type: string
security:
- oauth2:
- repository
- basic: []
- api_key: []
operationId: atlassianListPublicRepositories
components:
examples:
repository:
links:
self:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo
name: self
html:
href: https://bitbucket.org/example-user/example-repo
name: html
avatar:
href: https://bitbucket.org/example-user/example-repo/avatar/32/
name: avatar
pullrequests:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/pullrequests
name: pullrequests
commits:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/commits
name: commits
forks:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/forks
name: forks
watchers:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/watchers
name: watchers
downloads:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/downloads
name: downloads
clone:
- href: https://bitbucket.org/example-user/example-repo.git
name: https
- href: git@bitbucket.org:example-user/example-repo.git
name: ssh
hooks:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/hooks
name: hooks
uuid: '{a1b2c3d4-e5f6-7890-abcd-ef1234567890}'
full_name: example-user/example-repo
is_private: false
scm: git
name: example-repo
description: This is an example Bitbucket repository
created_on: '2023-01-15T10:30:00.000Z'
updated_on: '2024-01-15T14:45:30.000Z'
size: 1048576
language: javascript
has_issues: true
has_wiki: true
fork_policy: allow_forks
paginated-accounts_2:
size: 42
page: 1
pagelen: 10
next: https://api.example.com/accounts?page=2
previous: https://api.example.com/accounts?page=0
values:
created_on: '2023-11-15T10:30:00Z'
display_name: John Doe
username: john_doe-123
uuid: a1b2c3d4-e5f6-7890-abcd-ef1234567890
undefined:
type: repository
links:
self:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo
name: self
html:
href: https://bitbucket.org/example-user/example-repo
name: html
avatar:
href: https://bitbucket.org/example-user/example-repo/avatar/32/
name: avatar
pullrequests:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/pullrequests
name: pullrequests
commits:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/commits
name: commits
forks:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/forks
name: forks
watchers:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/watchers
name: watchers
downloads:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/downloads
name: downloads
clone:
- href: https://bitbucket.org/example-user/example-repo.git
name: https
- href: git@bitbucket.org:example-user/example-repo.git
name: ssh
hooks:
href: https://api.bitbucket.org/2.0/repositories/example-user/example-repo/hooks
name: hooks
uuid: '{a1b2c3d4-e5f6-7890-abcd-ef1234567890}'
full_name: example-user/example-repo
is_private: false
scm: git
name: example-repo
description: This is an example repository for demonstration purposes
created_on: '2023-01-15T10:30:00.000Z'
updated_on: '2024-01-10T14:22:00.000Z'
size: 1048576
language: python
has_issues: true
has_wiki: true
fork_policy: allow_forks
paginated-webhook-subscriptions:
size: 25
page: 1
pagelen: 10
next: https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks?page=2
previous: https://api.bitbucket.org/2.0/workspaces/my-workspace/hooks?page=0
values:
uuid: '{b3329d9d-fcb5-4c19-a5b5-4b0411dc93d1}'
url: https://example.com/webhooks/bitbucket
description: Webhook for CI/CD pipeline triggers
subject_type: repository
subject: {}
active: true
created_at: '2023-11-15T10:30:00Z'
events:
- repo:push
- pullrequest:created
- pullrequest:updated
- pullrequest:approved
- pullrequest:fulfilled
secret_set: true
deploy-key_2:
key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDak9i...
repository:
uuid: '{1234abcd-5678-efgh-9012-ijklmnopqrst}'
name: my-repository
full_name: myworkspace/my-repository
comment: deploy@example.com
label: Production Deploy Key
added_on: '2024-01-15T10:30:00Z'
last_used: '2024-01-20T14:45:00Z'
links:
self:
href: https://api.bitbucket.org/2.0/repositories/myworkspace/my-repository/deploy-keys/123
name: Production Deploy Key
owner:
uuid: '{abcd1234-efgh-5678-ijkl-9012mnopqrst}'
username: myworkspace
display_name: My Workspace
paginated-repository-permissions:
size: 42
page: 1
pagelen: 10
next: https://api.example.com/repositories/permissions?page=2
previous: https://api.example.com/repositories/permissions?page=0
values: {}
branching-model_2:
branch_types:
- kind: feature
prefix: feature/
- kind: bugfix
prefix: bugfix/
- kind: release
prefix: release/
- kind: hotfix
prefix: hotfix/
development:
name: develop
use_mainbranch: false
production:
name: main
use_mainbranch: true
pipeline-variable_2:
uuid: 3c7b8a9e-1234-5678-90ab-cdef12345678
key: API_TOKEN
value: my-secret-value
secured: true
webhook-subscription:
uuid: '{d7a4e3b2-5c1f-4a8b-9e2d-3f6c8a1b4e9d}'
url: https://example.com/webhooks/bitbucket
description: Webhook for monitoring pull request and repository events
subject_type: repository
subject: {}
active: true
created_at: '2024-01-15T10:30:00Z'
events:
- repo:push
- pullrequest:created
- pullrequest:approved
- pullrequest:fulfilled
- issue:created
secret_set: true
secret: my-secure-webhook-secret-123
paginated-repository-user-permissions:
size: 150
page: 1
pagelen: 10
next: https://api.example.com/repositories/permissions?page=2
previous: https://api.example.com/repositories/permissions?page=0
values: {}
application-property_2:
_attributes:
read:
- admin
- contributor
write:
- admin
customKey1: value1
customKey2: 123
customKey3:
nestedProperty: true
branching-model-settings_2:
links:
self:
href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/branching-model/settings
name: Branching Model Settings
branch_types:
- enabled: true
kind: feature
prefix: feature/
- enabled: true
kind: bugfix
prefix: bugfix/
- enabled: true
kind: release
prefix: release/
- enabled: false
kind: hotfix
prefix: hotfix/
development:
is_valid: true
name: develop
use_mainbranch: false
production:
is_valid: true
name: main
use_mainbranch: false
enabled: true
repository-user-permission:
type: repository_user_permission
permission: write
user:
username: johndoe
display_name: John Doe
uuid: '{12345678-1234-1234-1234-123456789abc}'
type: user
repository:
name: my-repo
full_name: johndoe/my-repo
uuid: '{87654321-4321-4321-4321-cba987654321}'
type: repository
links:
self:
href: https://api.bitbucket.org/2.0/repositories/johndoe/my-repo/permissions-config/users/johndoe
name: Repository User Permission
pipeline-variable:
uuid: 3c7e6a1b-4f2d-4e8a-9c5b-1a2b3c4d5e6f
key: DATABASE_URL
value: postgresql://localhost:5432/mydb
secured: false
paginated-repository-permissions_2:
size: 42
page: 1
pagelen: 10
next: https://api.example.com/repositories/permissions?page=2
previous: https://api.example.com/repositories/permissions?page=0
values: []
undefined_2:
size: 100
page: 1
pagelen: 10
query_substituted: false
next: https://api.example.com/resource?page=2
previous: https://api.example.com/resource?page=0
values: {}
deploy-key:
key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...
repository:
uuid: '{12345678-1234-1234-1234-123456789012}'
name: my-repository
full_name: myworkspace/my-repository
comment: deploy@server.example.com
label: Production Server Deploy Key
added_on: '2023-11-15T14:30:00Z'
last_used: '2024-01-20T09:15:00Z'
links:
self:
href: https://api.bitbucket.org/2.0/repositories/myworkspace/my-repository/deploy-keys/123
name: Production Deploy Key
owner:
uuid: '{87654321-4321-4321-4321-210987654321}'
username: myworkspace
display_name: My Workspace
repository-user-permission_2:
type: repository_user_permission
permission: write
user:
username: john_doe
display_name: John Doe
uuid: '{12345678-1234-1234-1234-123456789abc}'
repository:
name: my-repo
full_name: john_doe/my-repo
uuid: '{87654321-4321-4321-4321-cba987654321}'
links:
self:
href: https://api.bitbucket.org/2.0/repositories/john_doe/my-repo/permissions/john_doe
name: self
paginated-pipeline-variables:
page: 1
values:
uuid: 550e8400-e29b-41d4-a716-446655440000
key: DATABASE_URL
value: postgresql://localhost:5432/mydb
secured: false
size: 42
pagelen: 10
next: https://api.example.com/pipelines/variables?page=2
previous: https://api.example.com/pipelines/variables?page=0
paginated-deploy-keys:
size: 42
page: 1
pagelen: 10
next: https://api.example.com/deploy-keys?page=2
previous: https://api.example.com/deploy-keys?page=0
values:
key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC...
repository: {}
comment: Deploy key for production server
label: production-server-01
added_on: '2023-10-15T14:30:00Z'
last_used: '2024-01-20T09:15:30Z'
links:
self:
href: https://api.example.com/deploy-keys/123
name: production-deploy-key
owner: {}
repository-group-permission_2:
type: repository_group_permission
links:
self:
href: https://api.example.com/repositories/my-repo/permissions/groups/developers
name: self
permission: write
group:
type: group
name: developers
slug: developers
repository:
type: repository
name: my-repository
slug: my-repository
full_name: myworkspace/my-repository
issue_2:
links:
self:
href: https://api.example.com/repositories/myrepo/issues/123
name: 'Issue #123'
html:
href: https://example.com/myrepo/issues/123
name: View Issue
comments:
href: https://api.example.com/repositories/myrepo/issues/123/comments
name: Comments
attachments:
href: https://api.example.com/repositories/myrepo/issues/123/attachments
name: Attachments
watch:
href: https://api.example.com/repositories/myrepo/issues/123/watch
name: Watch
vote:
href: https://api.example.com/repositories/myrepo/issues/123/vote
name: Vote
id: 123
repository: {}
title: Fix login bug on mobile devices
reporter: {}
assignee: {}
created_on: '2023-10-15T14:30:00Z'
updated_on: '2023-10-16T09:15:00Z'
edited_on: '2023-10-16T09:15:00Z'
state: open
kind: bug
priority: major
milestone: {}
version: {}
component: {}
votes: 5
content:
raw: 'Users are unable to login on mobile devices. Steps to reproduce:
1. Open app on mobile
2. Enter credentials
3. Click login'
markup: markdown
html: '
Users are unable to login on mobile devices. Steps to reproduce: