openapi: 3.1.0 info: title: Atlassian Admin Account Branches 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: Branches paths: /repositories/{workspace}/{repo_slug}/branch-restrictions: 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: - Branches description: This operation retrieves all branch restrictions configured for a specific repository within a Bitbucket workspace. Branch restrictions are rules that control who can push to branches, require pull requests, enforce merge checks, or limit branch deletions. By sending a GET request to this endpoint with the workspace ID and repository slug, you receive a paginated list of all active restrictions including their types, patterns (which branches they apply to), and associated users or groups. This is useful for auditing repository security policies, understanding workflow requirements, or programmatically managing branch protection rules across multiple repositories. summary: Atlassian List Branch Restrictions responses: '200': description: A paginated list of branch restrictions content: application/json: schema: $ref: '#/components/schemas/paginated_branchrestrictions' '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' parameters: - name: kind in: query description: Branch restrictions of this type required: false schema: type: string - name: pattern in: query description: Branch restrictions applied to branches of this pattern required: false schema: type: string security: - oauth2: - repository:admin - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:repository:bitbucket operationId: listBranchRestrictions x-api-evangelist-processing: WriteDescription: true ChooseTags: true x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Branches description: This API operation creates a new branch restriction rule for a specific repository in Bitbucket Cloud, allowing workspace administrators to enforce policies on branches within a given repository. By sending a POST request to the endpoint with the workspace ID and repository slug as path parameters, users can define restrictions such as preventing force pushes, requiring pull request approvals, limiting who can merge or push to specific branches, or enforcing other branch protection policies. The request body typically includes details like the restriction type, the branch pattern to which the rule applies (using glob patterns or specific branch names), and the users or groups affected by the restriction. This functionality is essential for maintaining code quality and implementing workflow controls in collaborative development environments, ensuring that critical branches like main or production are protected from unauthorized or potentially harmful changes. summary: Atlassian Create Branch Restriction Rule responses: '201': description: A paginated list of branch restrictions content: application/json: schema: $ref: '#/components/schemas/branchrestriction' examples: branch-restriction_2: $ref: '#/components/examples/branch-restriction_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' requestBody: content: application/json: schema: $ref: '#/components/schemas/branchrestriction' examples: branch-restriction: $ref: '#/components/examples/branch-restriction' description: The new rule required: true security: - oauth2: - repository:admin - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:repository:bitbucket operationId: createBranchRestrictionRule x-api-evangelist-processing: WriteDescription: true ChooseTags: true GenerateExampleFromOperationRequestSchema: true GenerateExampleFromOperationResponseSchema: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}: parameters: - name: id in: path description: The restriction rule's 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 delete: tags: - Branches description: The Delete Branch Restriction Rule operation in the Atlassian Bitbucket Repositories API allows you to remove a specific branch restriction rule from a repository by making a DELETE request to the endpoint /repositories/{workspace}/{repo_slug}/branch-restrictions/{id}. This operation requires you to specify the workspace name, repository slug, and the unique identifier of the branch restriction rule you want to delete. Branch restrictions are used to enforce policies on branches, such as preventing direct pushes, requiring pull requests, or limiting who can merge changes. By deleting a branch restriction rule, you effectively remove those constraints from the specified branches in your repository. This operation is useful when you need to modify your repository's branch protection strategy, remove outdated restrictions, or adjust team workflows. Authentication and appropriate permissions are required to execute this operation successfully, as it affects repository security and collaboration policies. summary: Atlassian Delete Branch Restriction Rule responses: '204': description: '' '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 or branch restriction id 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: deleteBranchRestrictionRule x-api-evangelist-processing: WriteDescription: true ChooseTags: true x-microcks-operation: delay: 0 dispatcher: FALLBACK get: tags: - Branches description: The GET operation on the /repositories/{workspace}/{repo_slug}/branch-restrictions/{id} endpoint in the Atlassian Bitbucket Repositories API retrieves detailed information about a specific branch restriction rule within a repository. By providing the workspace identifier, repository slug, and the unique ID of the branch restriction, this operation returns the complete configuration of that particular rule, including its type (such as requiring pull request approvals, restricting pushes, or enforcing merge checks), the branch pattern it applies to, the users or groups it affects, and any associated permissions or conditions. This endpoint is useful for administrators and developers who need to audit existing branch protection settings, verify security policies, or programmatically inspect repository governance rules before making modifications. summary: Atlassian Get Branch Restriction Rule responses: '200': description: The branch restriction rule content: application/json: schema: $ref: '#/components/schemas/branchrestriction' examples: branch-restriction_2: $ref: '#/components/examples/branch-restriction_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 or branch restriction id 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: getBranchRestrictionRule x-api-evangelist-processing: WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true x-microcks-operation: delay: 0 dispatcher: FALLBACK put: tags: - Branches description: This API operation allows you to modify an existing branch restriction rule in a Bitbucket repository by specifying the workspace, repository slug, and the unique identifier of the restriction rule you want to update. The PUT request enables you to change the configuration of access controls and permissions that govern who can push, merge, or perform other operations on specific branches within the repository. You can adjust parameters such as the branch pattern the rule applies to, the type of restriction (like requiring pull requests or limiting direct pushes), and which users or groups are affected by or exempt from the rule. This is particularly useful for maintaining code quality and enforcing workflow policies as your team's requirements evolve, allowing administrators to refine branch protection rules without having to delete and recreate them from scratch. summary: Atlassian Update Branch Restriction Rule responses: '200': description: The updated branch restriction rule content: application/json: schema: $ref: '#/components/schemas/branchrestriction' examples: branch-restriction_2: $ref: '#/components/examples/branch-restriction_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 or branch restriction id does not exist content: application/json: schema: $ref: '#/components/schemas/error' requestBody: content: application/json: schema: $ref: '#/components/schemas/branchrestriction' examples: branch-restriction: $ref: '#/components/examples/branch-restriction' description: The new version of the existing rule required: true security: - oauth2: - repository:admin - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - admin:repository:bitbucket operationId: updateBranchRestrictionRule x-api-evangelist-processing: WriteDescription: true ChooseTags: true GenerateExampleFromOperationRequestSchema: true GenerateExampleFromOperationResponseSchema: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /repositories/{workspace}/{repo_slug}/refs: 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: - Branches description: This API endpoint retrieves a paginated list of references (branches and tags) for a specific repository within a Bitbucket workspace. By making a GET request to /repositories/{workspace}/{repo_slug}/refs, you can access all branch and tag references associated with the repository, where {workspace} represents the workspace ID or username and {repo_slug} identifies the specific repository. The response typically includes reference names, target commit hashes, and reference types, allowing developers to programmatically discover and work with the various branches and tags that exist in the repository for operations like branch comparison, deployment workflows, or repository analysis. summary: Atlassian List Branches and Tags responses: '200': description: A paginated list of refs matching any filter criteria that were provided. content: application/json: schema: $ref: '#/components/schemas/paginated_refs' examples: paginated-refs: $ref: '#/components/examples/paginated-refs' '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: The specified repository does not exist. 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).' 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). The `name` field is handled specially for refs in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return [''1.1'', ''1.2'', ''1.10''] instead of [''1.1'', ''1.10'', ''1.2''].' schema: type: string security: - oauth2: - repository - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:repository:bitbucket operationId: listBranchesAndTags x-api-evangelist-processing: WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /repositories/{workspace}/{repo_slug}/refs/branches: 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: - Branches description: This API operation retrieves a paginated list of all branches in a specified Bitbucket repository by providing the workspace identifier and repository slug in the path parameters. It returns comprehensive branch information including branch names, associated commit details, target information, and metadata about each branch's state. The response follows Bitbucket's standard pagination format, making it suitable for repositories with numerous branches, and is commonly used for displaying available branches, implementing branch selection interfaces, or auditing repository branch structure. summary: Atlassian List Open Branches responses: '200': description: A paginated list of branches matching any filter criteria that were provided. content: application/json: schema: $ref: '#/components/schemas/paginated_branches' examples: paginated-branches: $ref: '#/components/examples/paginated-branches' '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: The specified repository does not exist. 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).' 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). The `name` field is handled specially for branches in that, if specified as the sort field, it uses a natural sort order instead of the default lexicographical sort order. For example, it will return [''branch1'', ''branch2'', ''branch10''] instead of [''branch1'', ''branch10'', ''branch2''].' schema: type: string security: - oauth2: - repository - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:repository:bitbucket operationId: listOpenBranches x-api-evangelist-processing: WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true x-microcks-operation: delay: 0 dispatcher: FALLBACK post: tags: - Branches description: The Create Branch operation in the Atlassian Bitbucket Repositories API allows developers to programmatically create a new branch within a specified repository by sending a POST request to the /repositories/{workspace}/{repo_slug}/refs/branches endpoint. This operation requires authentication and takes the workspace identifier and repository slug as path parameters, along with a request body that typically includes the new branch name and the source commit or existing branch from which to create it. Upon successful execution, the API returns details about the newly created branch including its name, target commit hash, and associated metadata, enabling automated branch management workflows for version control and continuous integration processes. summary: Atlassian Create Branch responses: '201': description: The newly created branch object. content: application/json: schema: $ref: '#/components/schemas/branch' '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: The specified repository or branch does not exist. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - repository:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:repository:bitbucket - read:repository:bitbucket operationId: createBranch x-api-evangelist-processing: WriteDescription: true ChooseTags: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /repositories/{workspace}/{repo_slug}/refs/branches/{name}: parameters: - name: name in: path description: The name of the branch. 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: - Branches description: This API operation allows you to delete a specific branch from a repository in Bitbucket Cloud. By sending a DELETE request to the endpoint with the workspace ID, repository slug, and branch name, you can permanently remove the specified branch from the repository. This is useful for cleaning up merged feature branches, removing obsolete code branches, or managing your repository's branch structure. The operation requires appropriate permissions on the repository, and once executed, the branch and its reference will be removed, though the commits themselves may still be accessible through the repository's history if they were previously merged or referenced elsewhere. summary: Atlassian Delete Branch responses: '204': description: Indicates that the specified branch was successfully deleted. '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: The specified repository or branch does not exist. content: application/json: schema: $ref: '#/components/schemas/error' security: - oauth2: - repository:write - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - write:repository:bitbucket operationId: deleteBranch x-api-evangelist-processing: WriteDescription: true ChooseTags: true x-microcks-operation: delay: 0 dispatcher: FALLBACK get: tags: - Branches description: This API operation retrieves detailed information about a specific branch within a Bitbucket repository. By providing the workspace identifier, repository slug, and branch name in the endpoint path, users can fetch comprehensive data about the target branch including its latest commit details, author information, commit hash, and other branch-specific metadata. This is particularly useful for applications that need to programmatically access branch information for CI/CD pipelines, deployment workflows, or repository management tasks without having to clone the entire repository or traverse the full commit history. summary: Atlassian Get Branch responses: '200': description: The branch object. content: application/json: schema: $ref: '#/components/schemas/branch' examples: response: value: name: master links: commits: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/commits/master self: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/refs/branches/master html: href: https://bitbucket.org/atlassian/aui/branch/master default_merge_strategy: squash merge_strategies: - merge_commit - squash - fast_forward type: branch target: hash: e7d158ff7ed5538c28f94cd97a9ad569680fc94e repository: links: self: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui html: href: https://bitbucket.org/atlassian/aui avatar: href: https://bytebucket.org/ravatar/%7B585074de-7b60-4fd1-81ed-e0bc7fafbda5%7D?ts=86317 type: repository name: aui full_name: atlassian/aui uuid: '{585074de-7b60-4fd1-81ed-e0bc7fafbda5}' links: self: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e comments: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/comments patch: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/patch/e7d158ff7ed5538c28f94cd97a9ad569680fc94e html: href: https://bitbucket.org/atlassian/aui/commits/e7d158ff7ed5538c28f94cd97a9ad569680fc94e diff: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/diff/e7d158ff7ed5538c28f94cd97a9ad569680fc94e approve: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/approve statuses: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/e7d158ff7ed5538c28f94cd97a9ad569680fc94e/statuses author: raw: psre-renovate-bot type: author user: display_name: psre-renovate-bot uuid: '{250a442a-3ab3-4fcb-87c3-3c8f3df65ec7}' links: self: href: https://api.bitbucket.org/2.0/users/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D html: href: https://bitbucket.org/%7B250a442a-3ab3-4fcb-87c3-3c8f3df65ec7%7D/ avatar: href: https://secure.gravatar.com/avatar/6972ee037c9f36360170a86f544071a2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FP-3.png nickname: Renovate Bot type: user account_id: 5d5355e8c6b9320d9ea5b28d parents: - hash: eab868a309e75733de80969a7bed1ec6d4651e06 type: commit links: self: href: https://api.bitbucket.org/2.0/repositories/atlassian/aui/commit/eab868a309e75733de80969a7bed1ec6d4651e06 html: href: https://bitbucket.org/atlassian/aui/commits/eab868a309e75733de80969a7bed1ec6d4651e06 date: '2021-04-12T06:44:38+00:00' message: 'Merged in issue/NONE-renovate-master-babel-monorepo (pull request #2883) chore(deps): update babel monorepo to v7.13.15 (master) Approved-by: Chris "Daz" Darroch ' type: commit '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: The specified repository or branch 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: getBranch x-api-evangelist-processing: WriteDescription: true ChooseTags: true x-microcks-operation: delay: 0 dispatcher: FALLBACK /repositories/{workspace}/{repo_slug}/src: 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: - Branches description: The GET operation on /repositories/{workspace}/{repo_slug}/src endpoint in the Atlassian Bitbucket Repositories API retrieves the contents of the root directory from the main branch of a specified repository. By providing the workspace identifier and repository slug in the path parameters, this endpoint returns a paginated list of files and directories located at the repository's root level, including metadata such as file names, paths, sizes, and commit information. This operation is useful for browsing repository structure, displaying directory contents in user interfaces, or programmatically navigating through repository files without cloning the entire repository locally. summary: Atlassian Get the Root Directory of the Main Branch responses: '200': description: 'If the path matches a file, then the raw contents of the file are returned (unless the `format=meta` query parameter was provided, in which case a json document containing the file''s meta data is returned). If the path matches a directory, then a paginated list of file and directory entries is returned (if the `format=meta` query parameter was provided, then the json document containing the directory''s meta data is returned). ' content: application/json: schema: $ref: '#/components/schemas/paginated_treeentries' examples: paginated-tree-entry: $ref: '#/components/examples/paginated-tree-entry' '404': description: If the path or commit in the URL does not exist. content: application/json: schema: $ref: '#/components/schemas/error' parameters: - name: format in: query description: Instead of returning the file's contents, return the (json) meta data for it. required: false schema: type: string enum: - meta security: - oauth2: - repository - basic: [] - api_key: [] x-atlassian-oauth2-scopes: - state: Current scheme: oauth2 scopes: - read:repository:bitbucket operationId: getTheRootDirectoryOfTheMainBranch x-api-evangelist-processing: WriteDescription: true ChooseTags: true GenerateExampleFromOperationResponseSchema: true x-microcks-operation: delay: 0 dispatcher: FALLBACK components: schemas: account: allOf: - $ref: '#/components/schemas/object' - type: object title: Account description: An account object. properties: links: $ref: '#/components/schemas/account_links' created_on: type: string format: date-time display_name: type: string username: type: string pattern: ^[a-zA-Z0-9_\-]+$ uuid: type: string additionalProperties: true participant: allOf: - $ref: '#/components/schemas/object' - type: object title: Participant description: Object describing a user's role on resources like commits or pull requests. properties: user: $ref: '#/components/schemas/account' role: type: string enum: - PARTICIPANT - REVIEWER approved: type: boolean state: type: string enum: - approved - changes_requested - null participated_on: type: string description: The ISO8601 timestamp of the participant's action. For approvers, this is the time of their approval. For commenters and pull request reviewers who are not approvers, this is the time they last commented, or null if they have not commented. format: date-time additionalProperties: true team_links: allOf: - $ref: '#/components/schemas/account_links' - type: object title: Team Links description: Links related to a Team. properties: self: $ref: '#/components/schemas/link' html: $ref: '#/components/schemas/link' members: $ref: '#/components/schemas/link' projects: $ref: '#/components/schemas/link' repositories: $ref: '#/components/schemas/link' additionalProperties: true project: allOf: - $ref: '#/components/schemas/object' - type: object title: Project description: "A Bitbucket project.\n Projects are used by teams to organize repositories." properties: links: type: object properties: html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false avatar: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false uuid: type: string description: The project's immutable id. key: type: string description: The project's key. owner: $ref: '#/components/schemas/team' name: type: string description: The name of the project. description: type: string is_private: type: boolean description: ' Indicates whether the project is publicly accessible, or whether it is private to the team and consequently only visible to team members. Note that private projects cannot contain public repositories.' created_on: type: string format: date-time updated_on: type: string format: date-time has_publicly_visible_repos: type: boolean description: ' Indicates whether the project contains publicly visible repositories. Note that private projects cannot contain public repositories.' additionalProperties: true error: type: object title: Error description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string example: example_value error: type: object properties: message: type: string detail: type: string data: type: object description: Optional structured data that is endpoint-specific. properties: {} additionalProperties: true required: - message additionalProperties: false example: example_value required: - type additionalProperties: true group: allOf: - $ref: '#/components/schemas/object' - type: object title: Group description: A group object properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false owner: $ref: '#/components/schemas/account' workspace: $ref: '#/components/schemas/workspace' name: type: string slug: type: string description: 'The "sluggified" version of the group''s name. This contains only ASCII characters and can therefore be slightly different than the name' full_slug: type: string description: 'The concatenation of the workspace''s slug and the group''s slug, separated with a colon (e.g. `acme:developers`) ' additionalProperties: true author: allOf: - $ref: '#/components/schemas/object' - type: object title: Author description: The author of a change in a repository properties: raw: type: string description: The raw author value from the repository. This may be the only value available if the author does not match a user in Bitbucket. user: $ref: '#/components/schemas/account' additionalProperties: true team: allOf: - $ref: '#/components/schemas/account' - type: object title: Team description: A team object. properties: links: $ref: '#/components/schemas/team_links' additionalProperties: true paginated_refs: type: object title: Paginated Refs description: A paginated list of refs. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: array items: $ref: '#/components/schemas/ref' minItems: 0 uniqueItems: true example: [] additionalProperties: false workspace: allOf: - $ref: '#/components/schemas/object' - type: object title: Workspace description: "A Bitbucket workspace.\n Workspaces are used to organize repositories." properties: links: type: object properties: avatar: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false members: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false owners: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false projects: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false repositories: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false snippets: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false uuid: type: string description: The workspace's immutable id. name: type: string description: The name of the workspace. slug: type: string description: The short label that identifies this workspace. is_private: type: boolean description: 'Indicates whether the workspace is publicly accessible, or whether it is private to the members and consequently only visible to members.' created_on: type: string format: date-time updated_on: type: string format: date-time additionalProperties: true paginated_branchrestrictions: type: object title: Paginated Branch Restrictions description: A paginated list of branch restriction rules. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: array items: $ref: '#/components/schemas/branchrestriction' minItems: 0 uniqueItems: true example: [] additionalProperties: false object: type: object description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string example: example_value required: - type additionalProperties: true discriminator: propertyName: type repository: allOf: - $ref: '#/components/schemas/object' - type: object title: Repository description: A Bitbucket repository. properties: links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false avatar: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false pullrequests: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false commits: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false forks: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false watchers: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false downloads: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false clone: type: array items: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false hooks: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false uuid: type: string description: The repository's immutable id. This can be used as a substitute for the slug segment in URLs. Doing this guarantees your URLs will survive renaming of the repository by its owner, or even transfer of the repository to a different user. full_name: type: string description: The concatenation of the repository owner's username and the slugified name, e.g. "evzijst/interruptingcow". This is the same string used in Bitbucket URLs. is_private: type: boolean parent: $ref: '#/components/schemas/repository' scm: type: string enum: - git owner: $ref: '#/components/schemas/account' name: type: string description: type: string created_on: type: string format: date-time updated_on: type: string format: date-time size: type: integer language: type: string has_issues: type: boolean description: ' The issue tracker for this repository is enabled. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com. ' has_wiki: type: boolean description: ' The wiki for this repository is enabled. Wiki features are not supported for repositories in workspaces administered through admin.atlassian.com. ' fork_policy: type: string description: "\nControls the rules for forking this repository.\n\n* **allow_forks**: unrestricted forking\n* **no_public_forks**: restrict forking to private forks (forks cannot\n be made public later)\n* **no_forks**: deny all forking\n" enum: - allow_forks - no_public_forks - no_forks project: $ref: '#/components/schemas/project' mainbranch: $ref: '#/components/schemas/branch' additionalProperties: true account_links: type: object title: Account Links description: Links related to an Account. properties: avatar: $ref: '#/components/schemas/link' additionalProperties: true treeentry: type: object title: Tree Entry description: Base type for most resource objects. It defines the common `type` element that identifies an object's type. It also identifies the element as Swagger's `discriminator`. properties: type: type: string example: example_value path: type: string description: The path in the repository example: example_value commit: $ref: '#/components/schemas/commit' required: - type additionalProperties: true link: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri example: https://www.example.com name: type: string example: Example Title additionalProperties: false paginated_branches: type: object title: Paginated Branches description: A paginated list of branches. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: array items: $ref: '#/components/schemas/branch' minItems: 0 uniqueItems: true example: [] additionalProperties: false base_commit: allOf: - $ref: '#/components/schemas/object' - type: object title: Base Commit description: The common base type for both repository and snippet commits. properties: hash: type: string pattern: '[0-9a-f]{7,}?' date: type: string format: date-time author: $ref: '#/components/schemas/author' message: type: string summary: type: object properties: raw: type: string description: The text as it was typed by a user. markup: type: string description: The type of markup language the raw content is to be interpreted in. enum: - markdown - creole - plaintext html: type: string description: The user's content rendered as HTML. additionalProperties: false parents: type: array items: $ref: '#/components/schemas/base_commit' minItems: 0 additionalProperties: true paginated_treeentries: type: object title: Paginated Tree Entry description: A paginated list of commit_file and/or commit_directory objects. properties: size: type: integer description: Total number of objects in the response. This is an optional element that is not provided in all responses, as it can be expensive to compute. minimum: 0 example: 10 page: type: integer description: Page number of the current results. This is an optional element that is not provided in all responses. minimum: 1 example: 10 pagelen: type: integer description: Current number of objects on the existing page. The default value is 10 with 100 being the maximum allowed value. Individual APIs may enforce different values. minimum: 1 example: 10 next: type: string description: Link to the next page if it exists. The last page of a collection does not have this value. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com previous: type: string description: Link to previous page if it exists. A collections first page does not have this value. This is an optional element that is not provided in all responses. Some result sets strictly support forward navigation and never provide previous links. Clients must anticipate that backwards navigation is not always available. Use this link to navigate the result set and refrain from constructing your own URLs. format: uri example: https://www.example.com values: type: array items: $ref: '#/components/schemas/treeentry' minItems: 0 uniqueItems: true example: [] additionalProperties: false branch: allOf: - $ref: '#/components/schemas/ref' - type: object title: Branch description: A branch object, representing a branch in a repository. properties: merge_strategies: type: array description: Available merge strategies for pull requests targeting this branch. items: type: string enum: - merge_commit - squash - fast_forward default_merge_strategy: type: string description: The default merge strategy for pull requests targeting this branch. additionalProperties: true branchrestriction: allOf: - $ref: '#/components/schemas/object' - type: object title: Branch Restriction description: A branch restriction rule. properties: users: type: array items: $ref: '#/components/schemas/account' minItems: 0 groups: type: array items: $ref: '#/components/schemas/group' minItems: 0 additionalProperties: true commit: allOf: - $ref: '#/components/schemas/base_commit' - type: object title: Commit description: A repository commit object. properties: repository: $ref: '#/components/schemas/repository' participants: type: array items: $ref: '#/components/schemas/participant' minItems: 0 additionalProperties: true ref: type: object title: Ref description: A ref object, representing a branch or tag in a repository. properties: type: type: string example: example_value links: type: object properties: self: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false commits: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false html: type: object title: Link description: A link to a resource related to this object. properties: href: type: string format: uri name: type: string additionalProperties: false additionalProperties: false example: example_value name: type: string description: The name of the ref. example: Example Title target: $ref: '#/components/schemas/commit' required: - type additionalProperties: true examples: paginated-refs: size: 42 page: 1 pagelen: 10 next: https://api.example.com/refs?page=2 previous: https://api.example.com/refs?page=0 values: [] paginated-branches: size: 42 page: 1 pagelen: 10 next: https://api.example.com/repositories/my-repo/branches?page=2 previous: https://api.example.com/repositories/my-repo/branches?page=0 values: merge_strategies: - merge_commit - squash - fast_forward default_merge_strategy: merge_commit branch-restriction_2: users: links: self: href: https://api.bitbucket.org/2.0/users/example_user created_on: '2023-01-15T10:30:00Z' display_name: John Doe username: john_doe uuid: '{12345678-1234-1234-1234-123456789abc}' groups: links: self: href: https://api.bitbucket.org/2.0/groups/example_workspace/developers name: developers html: href: https://bitbucket.org/example_workspace/developers name: developers owner: created_on: '2022-05-20T08:15:00Z' display_name: Jane Smith username: jane_smith uuid: '{87654321-4321-4321-4321-cba987654321}' workspace: slug: example_workspace name: Example Workspace uuid: '{abcdef12-abcd-abcd-abcd-abcdef123456}' name: Developers slug: developers full_slug: example_workspace:developers branch-restriction: users: links: self: href: https://api.bitbucket.org/2.0/users/johndoe created_on: '2023-01-15T10:30:00Z' display_name: John Doe username: johndoe uuid: '{12345678-1234-1234-1234-123456789abc}' groups: links: self: href: https://api.bitbucket.org/2.0/workspaces/acme/groups/developers name: developers html: href: https://bitbucket.org/acme/workspace/settings/groups/developers name: developers owner: created_on: '2022-05-10T08:00:00Z' display_name: Acme Corp username: acme uuid: '{87654321-4321-4321-4321-cba987654321}' workspace: slug: acme name: Acme Corporation name: Developers slug: developers full_slug: acme:developers paginated-tree-entry: size: 42 page: 1 pagelen: 10 next: https://api.example.com/repositories/user/repo/tree/main?page=2 previous: https://api.example.com/repositories/user/repo/tree/main?page=0 values: [] securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: API Key description: Use an Atlassian API key as a Bearer token. Create API keys at https://admin.atlassian.com. oauth2: type: oauth2 description: OAuth 2.0 authorization for Atlassian Cloud APIs. flows: authorizationCode: authorizationUrl: https://auth.atlassian.com/authorize tokenUrl: https://auth.atlassian.com/oauth/token scopes: read:org:admin: Read organization information. write:org:admin: Modify organization settings. read:user:admin: Read user information. write:user:admin: Modify user accounts. read:policy:admin: Read organization policies. write:policy:admin: Modify organization policies. read:event:admin: Read organization events. externalDocs: description: Atlassian Admin REST API Documentation url: https://developer.atlassian.com/cloud/admin/organization/rest/intro/