openapi: 3.1.0
info:
title: Atlassian Admin Account Pull 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: Pull
paths:
/pullrequests/{selected_user}:
parameters:
- name: selected_user
in: path
description: 'This can either be the username of the pull request author, the author''s UUID
surrounded by curly-braces, for example: `{account UUID}`, or the author''s Atlassian ID.
'
required: true
schema:
type: string
get:
tags:
- Pull
description: Returns all pull requests authored by the specified user.
By default only open pull requests are returned. This can be controlled
using the `state` query parameter. To retrieve pull requests that are
in one of multiple states, repeat the `state` parameter for each
individual state.
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 Pull Requests for User
responses:
'200':
description: All pull requests authored by the specified user.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pullrequests'
examples:
paginated-pull-requests:
$ref: '#/components/examples/paginated-pull-requests'
'404':
description: If the specified user does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: state
in: query
description: Only return pull requests that are in this state. This parameter can be repeated.
schema:
type: string
enum:
- OPEN
- MERGED
- DECLINED
- SUPERSEDED
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
operationId: listPullRequestsForUser
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests:
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:
- Pull
description: Returns all pull requests on the specified repository.
By default only open pull requests are returned. This can be controlled
using the `state` query parameter. To retrieve pull requests that are
in one of multiple states, repeat the `state` parameter for each
individual state.
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 Pull Requests
responses:
'200':
description: All pull requests on the specified repository.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pullrequests'
examples:
paginated-pull-requests:
$ref: '#/components/examples/paginated-pull-requests'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the specified repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: state
in: query
description: Only return pull requests that are in this state. This parameter can be repeated.
schema:
type: string
enum:
- OPEN
- MERGED
- DECLINED
- SUPERSEDED
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listPullRequests
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Pull
description: This API operation creates a new pull request in a specified Bitbucket repository within a given workspace. By sending a POST request to the endpoint with the workspace identifier and repository slug as path parameters, users can programmatically initiate a pull request that proposes merging changes from a source branch into a destination branch. The request typically requires a JSON payload containing essential details such as the title, description, source branch, destination branch, and optionally reviewers or other metadata. Upon successful creation, the API returns the newly created pull request object with its unique identifier and associated properties, enabling automated workflows for code review processes and integration with CI/CD pipelines or project management tools.
summary: Atlassian Create Pull Request
responses:
'201':
description: The newly created pull request.
headers:
Location:
description: The URL of new newly created pull request.
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
'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/pullrequest'
examples:
create-pull-request:
$ref: '#/components/examples/create-pull-request'
description: 'The new pull request.
The request URL you POST to becomes the destination repository URL. For this reason, you must specify an explicit source repository in the request object if you want to pull from a different repository (fork).
Since not all elements are required or even mutable, you only need to include the elements you want to initialize, such as the source branch and the title.'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: createPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/activity:
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:
- Pull
description: 'The Atlassian Bitbucket Pull Requests API endpoint `/repositories/{workspace}/{repo_slug}/pullrequests/activity` using the GET method retrieves a comprehensive activity log of all pull requests within a specified repository. This endpoint requires two path parameters: `workspace` (the workspace ID or slug) and `repo_slug` (the repository identifier), and returns a chronological feed of events and activities related to pull requests, including actions such as creation, updates, comments, approvals, merges, and status changes. The response provides developers and teams with visibility into the complete lifecycle and collaboration history of pull requests in their repository, making it useful for auditing, monitoring team activity, generating reports, or building integrations that need to track pull request workflows and interactions over time.'
summary: Atlassian List Pull Request Activity Log
responses:
'200':
description: The pull request activity log
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the specified repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listPullRequestActivityLog
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: 'The Get Pull Request operation retrieves detailed information about a specific pull request within a Bitbucket repository by making a GET request to the endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}. This API call requires three path parameters: the workspace identifier, the repository slug, and the unique pull request ID. When invoked, it returns comprehensive data about the specified pull request, including its title, description, source and destination branches, author information, creation and update timestamps, current state (open, merged, declined), reviewer details, approval status, merge commit information if applicable, and associated metadata such as task counts and comment statistics. This operation is commonly used by developers and tools to inspect pull request details, monitor review progress, and integrate pull request workflows into CI/CD pipelines or project management systems.'
summary: Atlassian Get Pull Request
responses:
'200':
description: The pull request object
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the repository or pull request does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: getPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Pull
description: This API endpoint allows you to update an existing pull request in a Bitbucket repository by sending a PUT request to the specified path with the workspace name, repository slug, and pull request ID. You can modify various attributes of the pull request such as the title, description, source and destination branches, reviewers, and close source branch setting. The request requires authentication and appropriate permissions to modify the pull request. Upon successful execution, it returns the updated pull request object with all its current properties, while unsuccessful requests will return appropriate error responses with status codes indicating issues like authentication failures, insufficient permissions, or invalid parameters.
summary: Atlassian Update Pull Request
responses:
'200':
description: The updated pull request
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
examples:
undefined:
$ref: '#/components/examples/undefined'
'400':
description: If the input document was invalid.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: If the request was not authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the repository or pull request id does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
description: The pull request that is to be updated.
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: updatePullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: 'The Atlassian Bitbucket Pull Requests API endpoint `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity` with the GET method retrieves a comprehensive activity log for a specific pull request within a repository. This endpoint requires three path parameters: the workspace identifier, repository slug, and pull request ID, and returns a chronological list of all activities associated with that pull request, including comments, approvals, status changes, updates, merges, and other interactions performed by users. The activity log provides valuable insight into the collaboration history and lifecycle of the pull request, making it useful for tracking changes, understanding decision-making processes, and maintaining an audit trail of all modifications and discussions that occurred throughout the pull request''s lifetime.'
summary: Atlassian List Pull Request Activity Log
responses:
'200':
description: The pull request activity log
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the specified repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listPullRequestActivityLog
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: The Atlassian Bitbucket Pull Requests API DELETE endpoint at /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve allows authenticated users to remove their approval from a previously approved pull request. This operation requires the workspace name, repository slug, and pull request ID as path parameters to identify the specific pull request from which the approval should be withdrawn. When executed, it revokes the caller's approval status on the designated pull request, effectively removing their vote of confidence in merging the proposed changes. This is useful when a reviewer changes their mind after reviewing new commits, discovering issues, or when their initial approval was given in error. The endpoint returns a success response when the approval is successfully removed, and appropriate error codes if the pull request doesn't exist, the user hasn't previously approved it, or authentication fails.
summary: Atlassian Unapprove Pull Request
responses:
'204':
description: An empty response indicating the authenticated user's approval has been withdrawn.
'400':
description: Pull request cannot be unapproved because the pull request has already been merged.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: The request wasn't authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The specified pull request or the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- write:pullrequest:bitbucket
operationId: unapprovePullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Pull
description: This API operation allows an authenticated user to approve a specific pull request in a Bitbucket repository by sending a POST request to the endpoint with the workspace identifier, repository slug, and pull request ID as path parameters. When executed, it registers the user's approval for the proposed code changes, which is typically used in code review workflows to indicate that the changes meet quality standards and can proceed toward merging. The approval is associated with the authenticated user's account and contributes to the pull request's approval count, which may be required to satisfy merge criteria or organizational policies before the pull request can be merged into the target branch.
summary: Atlassian Approve Pull Request
responses:
'200':
description: The `participant` object recording that the authenticated user approved the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/participant'
examples:
undefined:
$ref: '#/components/examples/undefined'
'401':
description: The request wasn't authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The specified pull request or the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: approvePullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: Returns a paginated list of the pull request's comments.
This includes both global, inline comments and replies.
The default sorting is oldest to newest and can be overridden with
the `sort` query parameter.
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 Comments on Pull Request
responses:
'200':
description: A paginated list of comments made on the given pull request, in chronological order.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pullrequest_comments'
examples:
paginated-pull-request-comments:
$ref: '#/components/examples/paginated-pull-request-comments'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the pull request does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listCommentsOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Pull
description: 'The Create Comment On Pull Request operation allows developers to add new comments to a specific pull request in a Bitbucket repository by sending a POST request to the endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments. This API call requires authentication and takes three path parameters: the workspace identifier, the repository slug, and the pull request ID. The request body must include the comment content, and optionally can specify properties like inline comment positioning (file path, line numbers) for code-specific feedback, parent comment ID for threaded replies, and anchor information. Upon successful execution, the API returns the newly created comment object with details including the comment ID, author information, creation timestamp, and the comment content. This operation is commonly used in code review workflows to facilitate collaboration and discussion among team members regarding code changes proposed in pull requests.'
summary: Atlassian Create Comment on Pull Request
responses:
'201':
description: The newly created comment.
headers:
Location:
description: The URL of the new comment
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_comment'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the pull request does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_comment'
examples:
create-comment-on-pull-request:
$ref: '#/components/examples/create-comment-on-pull-request'
description: The comment object.
required: true
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: createCommentOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}:
parameters:
- name: comment_id
in: path
description: The id of the comment.
required: true
schema:
type: integer
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: This API operation allows you to permanently delete a specific comment from a pull request in a Bitbucket repository. By sending a DELETE request to the endpoint with the workspace identifier, repository slug, pull request ID, and comment ID, you can remove a previously posted comment from the pull request's discussion thread. This is useful for removing outdated, irrelevant, or erroneous comments, and typically requires appropriate permissions such as being the comment author or having administrative access to the repository. Once deleted, the comment cannot be recovered and will no longer be visible to other users reviewing the pull request.
summary: Atlassian Delete Comment on Pull Request
responses:
'204':
description: Successful deletion.
'403':
description: If the authenticated user does not have access to delete the comment.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: deleteCommentOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Pull
description: This API endpoint retrieves a specific comment from a pull request in a Bitbucket repository. By providing the workspace identifier, repository slug, pull request ID, and comment ID in the URL path, you can fetch detailed information about an individual comment, including its content, author, creation timestamp, and any associated metadata. This is useful when you need to access or display a particular comment without retrieving all comments on the pull request, making it more efficient for targeted comment operations such as displaying comment details, implementing deep linking to specific comments, or performing comment-specific actions in your application.
summary: Atlassian Get Comment on Pull Request
responses:
'200':
description: The comment.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_comment'
examples:
undefined:
$ref: '#/components/examples/undefined'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: getCommentOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Pull
description: The Update Comment On Pull Request operation in the Atlassian Bitbucket Pull Requests API allows you to modify an existing comment on a specific pull request by sending a PUT request to the endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}. This endpoint requires you to specify the workspace name, repository slug, pull request ID, and the unique comment ID you wish to update. The request typically includes the new comment content in the request body, which replaces the existing comment text while preserving the comment's metadata such as creation date and author information. This operation is commonly used when users need to correct typos, add additional information, or clarify previous feedback provided during code review processes. Authentication is required, and users must have appropriate permissions to modify comments, typically being either the comment author or having administrative access to the repository.
summary: Atlassian Update Comment on Pull Request
responses:
'200':
description: The updated comment.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_comment'
examples:
undefined:
$ref: '#/components/examples/undefined'
'403':
description: If the authenticated user does not have access to the comment.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_comment'
examples:
update-comment-on-pull-request:
$ref: '#/components/examples/update-comment-on-pull-request'
description: The contents of the updated comment.
required: true
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: updateCommentOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: This API endpoint retrieves a paginated list of all commits associated with a specific pull request in a Bitbucket repository. By making a GET request to this endpoint with the required workspace identifier, repository slug, and pull request ID, developers can access detailed information about each commit included in the pull request, such as commit hashes, authors, timestamps, and commit messages. This is particularly useful for code review processes, tracking changes within a pull request, understanding the development history, and verifying what modifications will be merged when the pull request is accepted.
summary: Atlassian List Commits on Pull Request
responses:
'200':
description: A paginated list of commits made on the given pull request, in chronological order. This list will be empty if the source branch no longer exists.
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the pull request does not exist or the source branch is from a forked repository which no longer exists.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listCommitsOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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
post:
tags:
- Pull
description: This API endpoint allows users to decline an open pull request in a Bitbucket repository by sending a POST request to the specified path with the workspace name, repository slug, and pull request ID. When invoked, it changes the pull request's state to declined, effectively rejecting the proposed changes without merging them into the target branch. This operation is typically used when the changes in a pull request are no longer needed, don't meet the project's requirements, or when an alternative solution has been chosen. The declined pull request remains visible in the repository's history but is marked as closed without being merged.
summary: Atlassian Decline Pull Request
responses:
'200':
description: The pull request was successfully declined.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
examples:
undefined:
$ref: '#/components/examples/undefined'
'555':
description: 'If the decline took too long and timed out.
In this case the caller should retry the request later.'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: declinePullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: 'The Bitbucket Pull Requests API endpoint `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff` retrieves the raw diff or patch output for a specific pull request, showing all code changes between the source and destination branches. This GET operation requires three path parameters: the workspace identifier, repository slug, and pull request ID, and returns the complete textual representation of file modifications, additions, and deletions in unified diff format. The response is particularly useful for code review processes, automated analysis tools, or integration with external systems that need to examine the exact line-by-line changes introduced by a pull request without using the Bitbucket web interface.'
summary: Atlassian List Changes in Pull Request
responses:
'302':
description: 'Redirects to the [repository diff](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diff-spec-get) with the
revspec that corresponds to the pull request.
'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listChangesInPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: 'This API endpoint retrieves the diffstat for a specific pull request in a Bitbucket repository, providing statistical information about the changes introduced by the pull request. It requires three path parameters: the workspace identifier, the repository slug, and the pull request ID. When called, it returns a summary of file modifications including the number of lines added, removed, and modified for each file affected by the pull request, which helps developers quickly understand the scope and impact of the proposed changes without reviewing the full diff.'
summary: Atlassian Get the Diff Stat for Pull Request
responses:
'302':
description: 'Redirects to the [repository diffstat](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-diffstat-spec-get) with
the revspec that corresponds to pull request.
'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: getTheDiffStatForPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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
post:
tags:
- Pull
description: This API endpoint allows you to merge a pull request in a Bitbucket repository by sending a POST request to the specified path with the workspace name, repository slug, and pull request ID. When executed, it attempts to merge the source branch into the destination branch of the pull request, completing the code review process and incorporating the proposed changes into the target branch. The operation requires appropriate permissions and will fail if there are merge conflicts, failing builds, or if required approvals haven't been met according to the repository's merge settings. Additional parameters can be passed in the request body to specify merge strategies, commit messages, and whether to close the source branch after merging.
summary: Atlassian Merge Pull Request
responses:
'200':
description: The pull request object.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
examples:
undefined:
$ref: '#/components/examples/undefined'
'202':
description: In the Location header, the URL to poll for the pull request merge status
'555':
description: 'If the merge took too long and timed out.
In this case the caller should retry the request later'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: async
in: query
description: 'Default value is false.
When set to true, runs merge asynchronously and
immediately returns a 202 with polling link to
the task-status API in the Location header.
When set to false, runs merge and waits for it to
complete, returning 200 when it succeeds. If the
duration of the merge exceeds a timeout threshold,
the API returns a 202 with polling link to the
task-status API in the Location header.'
required: false
schema:
type: boolean
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_merge_parameters'
examples:
pull-request-merge-parameters:
$ref: '#/components/examples/pull-request-merge-parameters'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: mergePullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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: task_id
in: path
description: ID of the merge task
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:
- Pull
description: This GET endpoint retrieves the current status of a merge task for a specific pull request in a Bitbucket repository. By providing the workspace identifier, repository slug, pull request ID, and task ID in the URL path, users can poll this endpoint to monitor the progress of an asynchronous merge operation. The response typically includes information about whether the merge task is pending, in progress, completed successfully, or has failed, along with any relevant error messages or completion details. This is particularly useful for tracking long-running merge operations or implementing automated workflows that need to wait for merge completion before proceeding with subsequent actions.
summary: Atlassian Get the Merge Task Status for Pull Request
responses:
'200':
description: Returns a task status if the merge is either pending or successful, and if it is successful, a pull request
'400':
description: If the provided task ID does not relate to this pull request, or if something went wrong during the merge operation
'403':
description: The user making the request does not have permission to the repo and is different from the user who queued the task
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: getTheMergeTaskStatusForPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: 'The Atlassian Bitbucket Pull Requests API endpoint `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch` using the GET method retrieves the raw patch file representation of a specific pull request, which contains the unified diff format showing all code changes between the source and destination branches. This endpoint requires three path parameters: the workspace identifier, the repository slug, and the pull request ID, and returns the patch in text format that can be applied using standard patch utilities or version control commands. The patch output includes metadata such as commit information, file modifications, additions, and deletions, making it useful for code review processes, automated testing pipelines, or applying changes across different repositories without performing a full merge operation.'
summary: Atlassian Get the Patch for Pull Request
responses:
'302':
description: 'Redirects to the [repository patch](/cloud/bitbucket/rest/api-group-commits/#api-repositories-workspace-repo-slug-patch-spec-get) with
the revspec that corresponds to pull request.
'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: getThePatchForPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: This API operation removes a change request from a specific pull request in a Bitbucket repository. It uses a DELETE method to target a particular pull request identified by the workspace, repository slug, and pull request ID. When executed, it withdraws a previously submitted request for changes, effectively removing the user's review status that indicated modifications were needed before the pull request could be merged. This is useful when a reviewer wants to retract their change request, perhaps because the issues have been addressed or the reviewer has changed their assessment of the pull request.
summary: Atlassian Remove Change Request for Pull Request
responses:
'204':
description: An empty response indicating the authenticated user's request for change has been withdrawn.
'400':
description: Pull request requested changes cannot be removed because the pull request has already been merged.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: The request wasn't authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The specified pull request or the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- write:pullrequest:bitbucket
operationId: removeChangeRequestForPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Pull
description: This API operation allows users to formally request changes on a specific pull request in a Bitbucket repository by submitting a POST request to the endpoint with the workspace identifier, repository slug, and pull request ID. When invoked, it marks the pull request with a "changes requested" status, indicating that the reviewer has identified issues or improvements that need to be addressed before the pull request can be approved and merged. This is part of Bitbucket's code review workflow, enabling collaborative development by providing a structured way for team members to communicate that modifications are necessary, typically accompanied by comments or feedback explaining what changes are needed.
summary: Atlassian Request Changes for Pull Request
responses:
'200':
description: The `participant` object recording that the authenticated user requested changes on the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/participant'
examples:
undefined:
$ref: '#/components/examples/undefined'
'400':
description: Pull request changes cannot be requested because the pull request has already been merged.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'401':
description: The request wasn't authenticated.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: The specified pull request or the repository does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: requestChangesForPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: This API operation retrieves all commit statuses associated with a specific pull request in a Bitbucket repository. By providing the workspace identifier, repository slug, and pull request ID in the endpoint path, users can fetch a comprehensive list of build statuses, test results, and other automated checks that have been reported for the commits within that pull request. This is particularly useful for monitoring CI/CD pipeline results, understanding the current state of code quality checks, and determining whether a pull request is ready to be merged based on the status of various automated validations and builds that have been executed against its commits.
summary: Atlassian List Commit Statuses for Pull Request
responses:
'200':
description: A paginated list of all commit statuses for this pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_commitstatuses'
examples:
paginated-commit-statuses:
$ref: '#/components/examples/paginated-commit-statuses'
'401':
description: If the repository is private and the request was not authenticated.
'404':
description: If the specified repository or pull request 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).
'
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).
Defaults to `created_on`.
'
required: false
schema:
type: string
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listCommitStatusesForPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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:
- Pull
description: This API endpoint retrieves all tasks associated with a specific pull request in a Bitbucket repository. By making a GET request to /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks, developers can fetch a list of tasks that have been created within the pull request's comments or description, where workspace identifies the Bitbucket workspace, repo_slug specifies the repository, and pull_request_id identifies the particular pull request. This is useful for tracking action items, to-dos, and checklist items that reviewers or collaborators have created during the code review process, enabling teams to manage and monitor outstanding work items before merging the pull request.
summary: Atlassian List Tasks on Pull Request
responses:
'200':
description: A paginated list of pull request tasks for the given pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_tasks'
examples:
paginated-tasks:
$ref: '#/components/examples/paginated-tasks'
'400':
description: If the user provides an invalid filter, sort, or fields query parameter.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the pull request does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
parameters:
- name: q
in: query
description: '
Query string to narrow down the response. See
[filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for details.'
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).
Defaults to `created_on`.
'
required: false
schema:
type: string
- name: pagelen
in: query
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.
'
required: false
schema:
type: integer
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: listTasksOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
tags:
- Pull
description: This API endpoint allows you to create a new task on a specific pull request within a Bitbucket repository. By sending a POST request to /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks, you can add actionable items or to-do items that need to be completed as part of the pull request review process. You must specify the workspace (team or user account), repository slug, and pull request ID in the URL path, along with task details in the request body such as the task description and its associated content. This is useful for tracking specific review requirements, requested changes, or action items that reviewers or contributors need to address before the pull request can be merged.
summary: Atlassian Create Task on Pull Request
responses:
'201':
description: The newly created task.
headers:
Location:
description: The URL of the new task
schema:
type: string
content:
application/json:
schema:
$ref: '#/components/schemas/A_pullrequest_comment_task'
'400':
description: There is a missing required field in the request or the task content is blank.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the pull request does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/A_pullrequest_task_create'
examples:
pull-request-task-create:
$ref: '#/components/examples/pull-request-task-create'
description: The contents of the task
required: true
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: createTaskOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}:
parameters:
- name: pull_request_id
in: path
description: The id of the pull request.
required: true
schema:
type: integer
- 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: task_id
in: path
description: The ID of the task.
required: true
schema:
type: integer
- 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:
- Pull
description: 'The Delete Task On Pull Request operation in the Atlassian Bitbucket Pull Requests API removes a specific task from a pull request by sending a DELETE request to the endpoint /repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}. This operation requires four path parameters: the workspace identifier, the repository slug, the pull request ID, and the task ID that uniquely identifies the task to be deleted. When successfully executed, this endpoint permanently removes the specified task from the pull request, which is useful for cleaning up completed tasks, removing obsolete action items, or managing the task list associated with code review processes. The operation requires appropriate authentication and permissions to modify tasks within the specified repository and pull request.'
summary: Atlassian Delete Task on Pull Request
responses:
'204':
description: Successful deletion.
'403':
description: If the authenticated user does not have access to delete the task.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the task does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: deleteTaskOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
get:
tags:
- Pull
description: The Get Task On Pull Request operation retrieves detailed information about a specific task associated with a pull request in a Bitbucket repository. By providing the workspace identifier, repository slug, pull request ID, and task ID in the endpoint path, this GET request returns the task's complete details including its content, status, creation date, assignee information, and any related metadata. This endpoint is useful for tracking individual tasks within a pull request's review process, allowing developers and team members to monitor task completion, view task descriptions, and understand task-specific requirements without having to fetch all tasks associated with the pull request.
summary: Atlassian Get Task on Pull Request
responses:
'200':
description: The task.
content:
application/json:
schema:
$ref: '#/components/schemas/A_pullrequest_comment_task'
examples:
undefined:
$ref: '#/components/examples/undefined'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the task does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: getTaskOnPullRequest
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
put:
tags:
- Pull
description: This API operation allows you to update an existing task associated with a specific pull request in a Bitbucket repository. By making a PUT request to this endpoint, you can modify task details such as its content, state, or other properties for a task identified by its unique task_id within a pull request specified by pull_request_id in a given repository (repo_slug) under a particular workspace. This is useful for managing code review checklists, action items, or follow-up tasks that need to be tracked as part of the pull request workflow, enabling teams to keep their development processes organized and ensure all necessary steps are completed before merging code changes.
summary: Atlassian Update Task on Pull Request
responses:
'200':
description: The updated task.
content:
application/json:
schema:
$ref: '#/components/schemas/A_pullrequest_comment_task'
examples:
pull-request-comment-task_2:
$ref: '#/components/examples/pull-request-comment-task_2'
'400':
description: There is a missing required field in the request or the task content is blank.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have access to the pull request.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the task does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/A_pullrequest_task_update'
examples:
pull-request-task-update:
$ref: '#/components/examples/pull-request-task-update'
description: The updated state and content of the task.
required: true
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
operationId: updateTaskOnPullRequest
x-api-evangelist-processing:
WriteDescription: true
ChooseTags: true
GenerateExampleFromOperationRequestSchema: true
GenerateExampleFromOperationResponseSchema: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/pullrequests/{pullrequest_id}/properties/{app_key}/{property_name}:
put:
responses:
'204':
description: An empty response.
operationId: updatePullRequestApplicationProperty
summary: Atlassian Update Pull Request Application Property
description: This API operation allows you to update or set an application-specific property on a Bitbucket pull request within a repository. By making a PUT request to the endpoint with the workspace identifier, repository slug, pull request ID, application key, and property name, you can store custom metadata or configuration data associated with that specific pull request. This is particularly useful for third-party applications or integrations that need to maintain their own state or settings related to a pull request, such as storing build statuses, review preferences, or custom workflow information. The operation requires appropriate authentication and permissions to modify properties on the specified pull request, and it will either create a new property if it doesn't exist or update the existing value if the property is already present.
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: pullrequest_id
description: The pull request ID.
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:
- Pull
security:
- oauth2: []
- basic: []
- api_key: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
responses:
'204':
description: An empty response.
operationId: deletePullRequestApplicationProperty
summary: Atlassian Delete Pull Request Application Property
description: This API operation allows you to delete a specific application property associated with a pull request in a Bitbucket repository. The endpoint requires you to specify the workspace, repository slug, pull request ID, application key, and property name in the URL path. When executed with a DELETE request, it removes the custom property data that was previously stored by an application for that particular pull request, effectively cleaning up application-specific metadata. This is useful for Bitbucket Connect apps or integrations that need to manage their own custom data associated with pull requests and want to remove properties that are no longer needed or relevant.
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: pullrequest_id
description: The pull request ID.
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:
- Pull
security:
- oauth2: []
- basic: []
- api_key: []
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:
$ref: '#/components/examples/application-property'
operationId: getPullRequestApplicationProperty
summary: Atlassian Get Pull Request Application Property
description: This API endpoint retrieves a specific application property value associated with a pull request in a Bitbucket repository, identified by the workspace, repository slug, pull request ID, application key, and property name parameters in the URL path. Application properties allow third-party apps and integrations to store custom metadata or configuration data against individual pull requests, enabling extended functionality beyond Bitbucket's native features. The GET operation returns the stored property value for the specified property name under the given app key, allowing applications to retrieve their previously stored data for use in workflows, automation, or custom UI elements related to the pull request.
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: pullrequest_id
description: The pull request ID.
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:
- Pull
security:
- oauth2: []
- basic: []
- api_key: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests:
get:
tags:
- Pull
summary: Atlassian List Pull Requests That Contain Commit
description: This API operation retrieves a list of pull requests that contain a specific commit within a Bitbucket repository. By making a GET request to the endpoint with the workspace identifier, repository slug, and commit hash, developers can discover which pull requests include the specified commit in their change history. This is particularly useful for tracking how code changes have propagated through the development workflow, understanding the context in which a commit was merged, performing impact analysis, or auditing which features or fixes include specific changes. The response returns pull request metadata including titles, authors, status, and related information for all pull requests containing the referenced commit.
operationId: listPullRequestsThatContainCommit
parameters:
- name: workspace
in: path
description: This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces
required: true
schema:
type: string
- name: repo_slug
in: path
description: The repository; either the UUID in curly braces, or the slug
required: true
schema:
type: string
- name: commit
in: path
description: The SHA1 of the commit
required: true
schema:
type: string
- name: page
in: query
description: Which page to retrieve
required: false
schema:
type: integer
format: int32
default: 1
- name: pagelen
in: query
description: How many pull requests to retrieve per page
required: false
schema:
type: integer
format: int32
default: 30
responses:
'200':
description: The paginated list of pull requests.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pullrequests'
examples:
paginated-pull-requests:
$ref: '#/components/examples/paginated-pull-requests_3'
'202':
description: The repository's pull requests are still being indexed.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pullrequests'
'404':
description: Either the repository does not exist, or pull request commit links have not yet been indexed.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
security:
- oauth2:
- pullrequest
- basic: []
- api_key: []
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
A_pullrequest_task_create:
type: object
title: Pull Request Task Create
description: A pullrequest task create
properties:
content:
type: object
title: Task Raw Content
description: task raw content
properties:
raw:
type: string
description: The task contents
required:
- raw
additionalProperties: false
example: example_value
comment:
$ref: '#/components/schemas/comment'
pending:
type: boolean
example: true
required:
- content
additionalProperties: false
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
paginated_tasks:
type: object
title: Paginated Tasks
description: A paginated list of tasks.
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/A_pullrequest_comment_task'
minItems: 0
uniqueItems: true
example: []
additionalProperties: false
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
A_pullrequest_task_update:
type: object
title: Pull Request Task Update
description: A pullrequest task update
properties:
content:
type: object
title: Task Raw Content
description: task raw content
properties:
raw:
type: string
description: The task contents
required:
- raw
additionalProperties: false
example: example_value
state:
type: string
enum:
- RESOLVED
- UNRESOLVED
example: RESOLVED
additionalProperties: false
A_pullrequest_comment_task:
allOf:
- $ref: '#/components/schemas/A_pull_request_task'
- type: object
title: Pull Request Comment Task
description: A pullrequest comment task
properties:
comment:
$ref: '#/components/schemas/comment'
additionalProperties: false
A_pull_request_task:
allOf:
- $ref: '#/components/schemas/task'
- type: object
title: Pull Request Task
description: A pull request task.
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
additionalProperties: false
pullrequest:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Pull Request
description: A pull request 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
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
approve:
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
diff:
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
diffstat:
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
comments:
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
activity:
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
merge:
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
decline:
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
id:
type: integer
description: The pull request's unique ID. Note that pull request IDs are only unique within their associated repository.
title:
type: string
description: Title of the pull request.
rendered:
type: object
title: Rendered Pull Request Markup
description: User provided pull request text, interpreted in a markup language and rendered in HTML
properties:
title:
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
description:
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
reason:
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
additionalProperties: false
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
state:
type: string
description: The pull request's current status.
enum:
- OPEN
- MERGED
- DECLINED
- SUPERSEDED
author:
$ref: '#/components/schemas/account'
source:
$ref: '#/components/schemas/pullrequest_endpoint'
destination:
$ref: '#/components/schemas/pullrequest_endpoint'
merge_commit:
type: object
title: Pull Request Commit
properties:
hash:
type: string
pattern: '[0-9a-f]{7,}?'
additionalProperties: false
comment_count:
type: integer
description: The number of comments for a specific pull request.
minimum: 0
task_count:
type: integer
description: The number of open tasks for a specific pull request.
minimum: 0
close_source_branch:
type: boolean
description: A boolean flag indicating if merging the pull request closes the source branch.
closed_by:
$ref: '#/components/schemas/account'
reason:
type: string
description: Explains why a pull request was declined. This field is only applicable to pull requests in rejected state.
created_on:
type: string
description: The ISO8601 timestamp the request was created.
format: date-time
updated_on:
type: string
description: The ISO8601 timestamp the request was last updated.
format: date-time
reviewers:
type: array
description: The list of users that were added as reviewers on this pull request when it was created. For performance reasons, the API only includes this list on a pull request's `self` URL.
items:
$ref: '#/components/schemas/account'
participants:
type: array
description: " The list of users that are collaborating on this pull request.\n Collaborators are user that:\n\n * are added to the pull request as a reviewer (part of the reviewers\n list)\n * are not explicit reviewers, but have commented on the pull request\n * are not explicit reviewers, but have approved the pull request\n\n Each user is wrapped in an object that indicates the user's role and\n whether they have approved the pull request. For performance reasons,\n the API only returns this list when an API requests a pull request by\n id.\n "
items:
$ref: '#/components/schemas/participant'
additionalProperties: true
paginated_pullrequests:
type: object
title: Paginated Pull Requests
description: A paginated list of pullrequests.
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/pullrequest'
minItems: 0
uniqueItems: true
example: []
additionalProperties: false
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
commitstatus:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Commit Status
description: A commit status 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
commit:
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 commit status' id.
key:
type: string
description: "An identifier for the status that's unique to\n its type (current \"build\" is the only supported type) and the vendor,\n e.g. BB-DEPLOY"
refname:
type: string
description: '
The name of the ref that pointed to this commit at the time the status
object was created. Note that this the ref may since have moved off of
the commit. This optional field can be useful for build systems whose
build triggers and configuration are branch-dependent (e.g. a Pipeline
build).
It is legitimate for this field to not be set, or even apply (e.g. a
static linting job).'
url:
type: string
description: A URL linking back to the vendor or build system, for providing more information about whatever process produced this status. Accepts context variables `repository` and `commit` that Bitbucket will evaluate at runtime whenever at runtime. For example, one could use https://foo.com/builds/{repository.full_name} which Bitbucket will turn into https://foo.com/builds/foo/bar at render time.
state:
type: string
description: Provides some indication of the status of this commit
enum:
- INPROGRESS
- FAILED
- STOPPED
- SUCCESSFUL
name:
type: string
description: An identifier for the build itself, e.g. BB-DEPLOY-1
description:
type: string
description: A description of the build (e.g. "Unit tests in Bamboo")
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
additionalProperties: true
pullrequest_endpoint:
type: object
title: Pull Request Endpoint
properties:
repository:
$ref: '#/components/schemas/repository'
branch:
type: object
title: Pull Request Branch
properties:
name:
type: string
merge_strategies:
type: array
description: Available merge strategies, when this endpoint is the destination of the pull request.
items:
type: string
enum:
- merge_commit
- squash
- fast_forward
default_merge_strategy:
type: string
description: The default merge strategy, when this endpoint is the destination of the pull request.
additionalProperties: false
example: example_value
commit:
type: object
title: Pull Request Commit
properties:
hash:
type: string
pattern: '[0-9a-f]{7,}?'
additionalProperties: false
example: example_value
additionalProperties: false
team:
allOf:
- $ref: '#/components/schemas/account'
- type: object
title: Team
description: A team object.
properties:
links:
$ref: '#/components/schemas/team_links'
additionalProperties: true
paginated_commitstatuses:
type: object
title: Paginated Commit Statuses
description: A paginated list of commit status 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/commitstatus'
minItems: 0
uniqueItems: true
example: []
additionalProperties: false
comment_resolution:
type: object
title: Comment Resolution
description: The resolution object for a Comment.
properties:
type:
type: string
example: example_value
user:
$ref: '#/components/schemas/account'
created_on:
type: string
description: The ISO8601 timestamp the resolution was created.
format: date-time
example: '2026-01-15T10:30:00Z'
required:
- type
additionalProperties: true
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
comment:
allOf:
- $ref: '#/components/schemas/object'
- type: object
title: Comment
description: The base type for all comments. This type should be considered abstract. Each of the "commentable" resources defines its own subtypes (e.g. `issue_comment`).
properties:
id:
type: integer
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
content:
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
user:
$ref: '#/components/schemas/account'
deleted:
type: boolean
parent:
$ref: '#/components/schemas/comment'
inline:
type: object
properties:
from:
type: integer
description: The comment's anchor line in the old version of the file.
minimum: 1
to:
type: integer
description: The comment's anchor line in the new version of the file. If the 'from' line is also provided, this value will be removed.
minimum: 1
path:
type: string
description: The path of the file this comment is anchored to.
required:
- path
additionalProperties: false
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
code:
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
additionalProperties: true
application_property:
additionalProperties: true
type: object
title: Application Property
description: "An application property. It is a caller defined JSON object that Bitbucket will store and return. \nThe `_attributes` field at its top level can be used to control who is allowed to read and update the property. \nThe keys of the JSON object must match an allowed pattern. For details, \nsee [Application properties](/cloud/bitbucket/application-properties/).\n"
properties:
_attributes:
type: array
items:
type: string
enum:
- public
- read_only
example: []
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
pullrequest_merge_parameters:
type: object
title: Pull Request Merge Parameters
description: The metadata that describes a pull request merge.
properties:
type:
type: string
example: example_value
message:
type: string
description: The commit message that will be used on the resulting commit.
example: example_value
close_source_branch:
type: boolean
description: Whether the source branch should be deleted. If this is not provided, we fallback to the value used when the pull request was created, which defaults to False
example: true
merge_strategy:
type: string
description: The merge strategy that will be used to merge the pull request.
enum:
- merge_commit
- squash
- fast_forward
default: merge_commit
example: merge_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
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
task:
type: object
title: Task
description: A task object.
properties:
id:
type: integer
example: abc123
created_on:
type: string
format: date-time
example: '2026-01-15T10:30:00Z'
updated_on:
type: string
format: date-time
example: '2026-01-15T10:30:00Z'
state:
type: string
enum:
- RESOLVED
- UNRESOLVED
example: RESOLVED
content:
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
example: example_value
creator:
$ref: '#/components/schemas/account'
pending:
type: boolean
example: true
resolved_on:
type: string
description: The ISO8601 timestamp for when the task was resolved.
format: date-time
example: '2026-01-15T10:30:00Z'
resolved_by:
$ref: '#/components/schemas/account'
required:
- created_on
- updated_on
- state
- content
- creator
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
pullrequest_comment:
allOf:
- $ref: '#/components/schemas/comment'
- type: object
title: Pull Request Comment
description: A pullrequest comment.
properties:
pullrequest:
$ref: '#/components/schemas/pullrequest'
resolution:
$ref: '#/components/schemas/comment_resolution'
pending:
type: boolean
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
paginated_pullrequest_comments:
type: object
title: Paginated Pull Request Comments
description: A paginated list of pullrequest comments.
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/pullrequest_comment'
minItems: 0
uniqueItems: true
example: []
additionalProperties: false
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:
pull-request-merge-parameters:
type: pullrequest_merge
message: 'Merge pull request #123: Add new feature'
close_source_branch: true
merge_strategy: squash
paginated-pull-request-comments:
size: 42
page: 1
pagelen: 10
next: https://api.bitbucket.org/2.0/repositories/example/repo/pullrequests/1/comments?page=2
previous: https://api.bitbucket.org/2.0/repositories/example/repo/pullrequests/1/comments?page=0
values: []
application-property:
_attributes:
- public
- read_only
customField1: example value
customField2: 123
nestedObject:
key: value
pull-request-comment-task_2:
comment:
id: 123e4567-e89b-12d3-a456-426614174000
text: Please review the changes in the authentication module
author: john.doe
created_at: '2024-01-15T10:30:00Z'
undefined:
id: 12345
created_on: '2023-10-15T14:30:00.000000+00:00'
updated_on: '2023-10-15T15:45:00.000000+00:00'
content:
raw: This looks good to me!
markup: markdown
html:
This looks good to me!
user: display_name: John Doe uuid: '{a1b2c3d4-e5f6-7g8h-9i0j-k1l2m3n4o5p6}' username: johndoe type: user deleted: false parent: id: 12340 inline: to: 15 from: 10 path: src/main.py type: pullrequest_comment pullrequest: id: 789 title: Add new feature type: pullrequest resolution: status: resolved timestamp: '2023-10-15T16:00:00.000000+00:00' pending: false pull-request-task-update: content: raw: Review the authentication logic in the login module state: RESOLVED paginated-pull-requests_3: size: 50 page: 1 pagelen: 10 next: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests?page=2 previous: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests?page=0 values: links: self: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1 name: 'Pull Request #1' html: href: https://bitbucket.org/myworkspace/myrepo/pull-requests/1 name: View PR commits: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/commits approve: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/approve diff: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/diff diffstat: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/diffstat comments: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/comments activity: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/activity merge: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/merge decline: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/decline id: 1 title: Add new feature implementation rendered: title: raw: Add new feature implementation markup: markdown html:Add new feature implementation
description: raw: This PR implements the new authentication feature markup: markdown html:This PR implements the new authentication feature
reason: raw: '' markup: markdown html: '' summary: raw: This PR implements the new authentication feature markup: markdown html:This PR implements the new authentication feature
state: OPEN merge_commit: hash: a1b2c3d4e5f comment_count: 5 task_count: 2 close_source_branch: true reason: '' created_on: '2024-01-15T10:30:00Z' updated_on: '2024-01-16T14:45:00Z' pull-request-task-create: content: raw: Please review the authentication logic in the login handler comment: id: 12345 pending: false paginated-pull-requests: size: 42 page: 1 pagelen: 10 next: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests?page=2 previous: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests?page=0 values: [] paginated-tasks: size: 42 page: 1 pagelen: 10 next: https://api.example.com/tasks?page=2 previous: https://api.example.com/tasks?page=0 values: [] create-pull-request: type: pullrequest links: self: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1 name: 'Pull Request #1' html: href: https://bitbucket.org/myworkspace/myrepo/pull-requests/1 name: 'Pull Request #1' commits: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/commits approve: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/approve diff: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/diff diffstat: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/diffstat comments: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/comments activity: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/activity merge: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/merge decline: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/1/decline id: 1 title: Add new feature rendered: title: raw: Add new feature markup: markdown html:Add new feature
description: raw: This PR adds a new feature to improve functionality. markup: markdown html:This PR adds a new feature to improve functionality.
reason: raw: '' markup: markdown html: '' summary: raw: This PR adds a new feature to improve functionality. markup: markdown html:This PR adds a new feature to improve functionality.
state: OPEN author: type: account username: john_doe display_name: John Doe source: branch: name: feature/new-feature commit: hash: a1b2c3d4e5f repository: type: repository name: myrepo full_name: myworkspace/myrepo destination: branch: name: main commit: hash: f5e4d3c2b1a repository: type: repository name: myrepo full_name: myworkspace/myrepo merge_commit: hash: abc123def45 comment_count: 3 task_count: 1 close_source_branch: true closed_by: null reason: '' created_on: '2023-10-15T14:30:00.000Z' updated_on: '2023-10-16T09:15:00.000Z' reviewers: - type: account username: jane_smith display_name: Jane Smith participants: - type: participant user: type: account username: jane_smith display_name: Jane Smith role: REVIEWER approved: true participated_on: '2023-10-15T15:00:00.000Z' create-comment-on-pull-request: id: 12345 created_on: '2023-10-15T14:30:00.000Z' updated_on: '2023-10-15T15:45:00.000Z' content: raw: This looks good, but could you add some tests? markup: markdown html:This looks good, but could you add some tests?
user: display_name: John Doe uuid: '{user-uuid}' username: johndoe deleted: false inline: to: 42 from: 38 path: src/main.js pullrequest: id: 789 title: Add new feature type: pullrequest links: self: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/789 resolution: type: resolved created_on: '2023-10-15T16:00:00.000Z' user: display_name: Jane Smith uuid: '{user-uuid-2}' username: janesmith pending: false paginated-commit-statuses: size: 42 page: 1 pagelen: 10 next: https://api.example.com/commits/statuses?page=2 previous: https://api.example.com/commits/statuses?page=0 values: [] update-comment-on-pull-request: type: pullrequest_comment id: 12345 created_on: '2023-11-15T10:30:00.000Z' updated_on: '2023-11-15T14:45:00.000Z' content: raw: This looks good, but please consider refactoring this section. markup: markdown html:This looks good, but please consider refactoring this section.
user: type: user display_name: John Doe uuid: '{a1b2c3d4-e5f6-7890-abcd-ef1234567890}' username: johndoe deleted: false inline: to: 45 from: 42 path: src/main.js pullrequest: type: pullrequest id: 789 title: Add new feature links: self: href: https://api.bitbucket.org/2.0/repositories/myworkspace/myrepo/pullrequests/789 resolution: state: resolved user: type: user display_name: Jane Smith uuid: '{b2c3d4e5-f6g7-8901-bcde-f12345678901}' username: janesmith created_on: '2023-11-15T15:00:00.000Z' pending: false requestBodies: application_property: content: application/json: schema: $ref: '#/components/schemas/application_property' description: The application property to create or update. required: true 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/