openapi: 3.1.0
info:
title: Atlassian Admin Account Pullrequests 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: Pullrequests
paths:
/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
put:
tags:
- Pullrequests
description: This API operation updates an existing task associated with a specific pull request in a Bitbucket repository. By sending a PUT request to the endpoint with the workspace identifier, repository slug, pull request ID, and task ID, you can modify task properties such as its content, state, or other metadata. This is useful for managing and tracking action items or to-do items that are linked to code reviews within pull requests, allowing teams to update task status or details as work progresses during the review process.
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:
undefined:
$ref: '#/components/examples/undefined'
'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-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
tags:
- Pullrequests
description: Deletes a specific pull request task.
summary: Atlassian Delete A Task On A 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: atlassianDeleteATaskOnAPullRequest
get:
tags:
- Pullrequests
description: Returns a specific pull request task.
summary: Atlassian Get A Task On A Pull Request
responses:
'200':
description: The task.
content:
application/json:
schema:
$ref: '#/components/schemas/A_pullrequest_comment_task'
'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: atlassianGetATaskOnAPullRequest
/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:
- Pullrequests
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 A User
responses:
'200':
description: All pull requests authored by the specified user.
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_pullrequests'
'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: atlassianListPullRequestsForAUser
/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:
- Pullrequests
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'
'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: atlassianListPullRequests
post:
tags:
- Pullrequests
description: 'Creates a new pull request where the destination repository is
this repository and the author is the authenticated user.
The minimum required fields to create a pull request are `title` and
`source`, specified by a branch name.
```
curl https://api.bitbucket.org/2.0/repositories/my-workspace/my-repository/pullrequests \
-u my-username:my-password \
--request POST \
--header ''Content-Type: application/json'' \
--data ''{
"title": "My Title",
"source": {
"branch": {
"name": "staging"
}
}
}''
```
If the pull request''s `destination` is not specified, it will default
to the `repository.mainbranch`. To open a pull request to a
different branch, say from a feature branch to a staging branch,
specify a `destination` (same format as the `source`):
```
{
"title": "My Title",
"source": {
"branch": {
"name": "my-feature-branch"
}
},
"destination": {
"branch": {
"name": "staging"
}
}
}
```
Reviewers can be specified by adding an array of user objects as the
`reviewers` property.
```
{
"title": "My Title",
"source": {
"branch": {
"name": "my-feature-branch"
}
},
"reviewers": [
{
"uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}"
}
]
}
```
Other fields:
* `description` - a string
* `close_source_branch` - boolean that specifies if the source branch should be closed upon merging'
summary: Atlassian Create A 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'
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: atlassianCreateAPullRequest
/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:
- Pullrequests
description: 'Returns a paginated list of the pull request''s activity log.
This handler serves both a v20 and internal endpoint. The v20 endpoint
returns reviewer comments, updates, approvals and request changes. The internal
endpoint includes those plus tasks and attachments.
Comments created on a file or a line of code have an inline property.
Comment example:
```
{
"pagelen": 20,
"values": [
{
"comment": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088"
}
},
"deleted": false,
"pullrequest": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
},
"content": {
"raw": "inline with to a dn from lines",
"markup": "markdown",
"html": "inline with to a dn from lines",
"type": "rendered"
},
"created_on": "2019-09-27T00:33:46.039178+00:00",
"user": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
},
"created_on": "2019-09-27T00:33:46.039178+00:00",
"user": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
},
"updated_on": "2019-09-27T00:33:46.055384+00:00",
"inline": {
"context_lines": "",
"to": null,
"path": "",
"outdated": false,
"from": 211
},
"type": "pullrequest_comment",
"id": 118571088
},
"pull_request": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
}
}
]
}
```
Updates include a state property of OPEN, MERGED, or DECLINED.
Update example:
```
{
"pagelen": 20,
"values": [
{
"update": {
"description": "",
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it",
"destination": {
"commit": {
"type": "commit",
"hash": "6a2c16e4a152",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152"
}
}
},
"branch": {
"name": "master"
},
"repository": {
"name": "Atlaskit-MK-2",
"type": "repository",
"full_name": "atlassian/atlaskit-mk-2",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
}
},
"uuid": "{}"
}
},
"reason": "",
"source": {
"commit": {
"type": "commit",
"hash": "728c8bad1813",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813"
}
}
},
"branch": {
"name": "username/NONE-add-onClick-prop-for-accessibility"
},
"repository": {
"name": "Atlaskit-MK-2",
"type": "repository",
"full_name": "atlassian/atlaskit-mk-2",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
}
},
"uuid": "{}"
}
},
"state": "OPEN",
"author": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
},
"date": "2019-05-10T06:48:25.305565+00:00"
},
"pull_request": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
}
}
]
}
```
Approval example:
```
{
"pagelen": 20,
"values": [
{
"approval": {
"date": "2019-09-27T00:37:19.849534+00:00",
"pullrequest": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
},
"user": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
}
},
"pull_request": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
}
}
]
}
```'
summary: Atlassian List A 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: atlassianListAPullRequestActivityLog
/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:
- Pullrequests
description: Returns the specified pull request.
summary: Atlassian Get A 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: atlassianGetAPullRequest
put:
tags:
- Pullrequests
description: Mutates the specified pull request.
This can be used to change the pull request's branches or description.
Only open pull requests can be mutated.
summary: Atlassian Update A Pull Request
responses:
'200':
description: The updated pull request
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
'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: atlassianUpdateAPullRequest
/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:
- Pullrequests
description: 'Returns a paginated list of the pull request''s activity log.
This handler serves both a v20 and internal endpoint. The v20 endpoint
returns reviewer comments, updates, approvals and request changes. The internal
endpoint includes those plus tasks and attachments.
Comments created on a file or a line of code have an inline property.
Comment example:
```
{
"pagelen": 20,
"values": [
{
"comment": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695/comments/118571088"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695/_/diff#comment-118571088"
}
},
"deleted": false,
"pullrequest": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
},
"content": {
"raw": "inline with to a dn from lines",
"markup": "markdown",
"html": "inline with to a dn from lines",
"type": "rendered"
},
"created_on": "2019-09-27T00:33:46.039178+00:00",
"user": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
},
"created_on": "2019-09-27T00:33:46.039178+00:00",
"user": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
},
"updated_on": "2019-09-27T00:33:46.055384+00:00",
"inline": {
"context_lines": "",
"to": null,
"path": "",
"outdated": false,
"from": 211
},
"type": "pullrequest_comment",
"id": 118571088
},
"pull_request": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
}
}
]
}
```
Updates include a state property of OPEN, MERGED, or DECLINED.
Update example:
```
{
"pagelen": 20,
"values": [
{
"update": {
"description": "",
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it",
"destination": {
"commit": {
"type": "commit",
"hash": "6a2c16e4a152",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/6a2c16e4a152"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/6a2c16e4a152"
}
}
},
"branch": {
"name": "master"
},
"repository": {
"name": "Atlaskit-MK-2",
"type": "repository",
"full_name": "atlassian/atlaskit-mk-2",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
}
},
"uuid": "{}"
}
},
"reason": "",
"source": {
"commit": {
"type": "commit",
"hash": "728c8bad1813",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/commit/728c8bad1813"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/commits/728c8bad1813"
}
}
},
"branch": {
"name": "username/NONE-add-onClick-prop-for-accessibility"
},
"repository": {
"name": "Atlaskit-MK-2",
"type": "repository",
"full_name": "atlassian/atlaskit-mk-2",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2"
},
"avatar": {
"href": "https://bytebucket.org/ravatar/%7B%7D?ts=js"
}
},
"uuid": "{}"
}
},
"state": "OPEN",
"author": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
},
"date": "2019-05-10T06:48:25.305565+00:00"
},
"pull_request": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
}
}
]
}
```
Approval example:
```
{
"pagelen": 20,
"values": [
{
"approval": {
"date": "2019-09-27T00:37:19.849534+00:00",
"pullrequest": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
},
"user": {
"display_name": "Name Lastname",
"uuid": "{}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/%7B%7D"
},
"html": {
"href": "https://bitbucket.org/%7B%7D/"
},
"avatar": {
"href": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/:/128"
}
},
"type": "user",
"nickname": "Name",
"account_id": ""
}
},
"pull_request": {
"type": "pullrequest",
"id": 5695,
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/atlaskit-mk-2/pullrequests/5695"
},
"html": {
"href": "https://bitbucket.org/atlassian/atlaskit-mk-2/pull-requests/5695"
}
},
"title": "username/NONE: small change from onFocus to onClick to handle tabbing through the page and not expand the editor unless a click event triggers it"
}
}
]
}
```'
summary: Atlassian List A 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: atlassianListAPullRequestActivityLog
/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:
- Pullrequests
description: Redact the authenticated user's approval of the specified pull
request.
summary: Atlassian Unapprove A 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: atlassianUnapproveAPullRequest
post:
tags:
- Pullrequests
description: Approve the specified pull request as the authenticated user.
summary: Atlassian Approve A 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'
'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: atlassianApproveAPullRequest
/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:
- Pullrequests
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 A 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'
'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: atlassianListCommentsOnAPullRequest
post:
tags:
- Pullrequests
description: Creates a new pull request comment.
Returns the newly created pull request comment.
summary: Atlassian Create A Comment On A 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'
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: atlassianCreateACommentOnAPullRequest
/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:
- Pullrequests
description: Deletes a specific pull request comment.
summary: Atlassian Delete A Comment On A 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: atlassianDeleteACommentOnAPullRequest
get:
tags:
- Pullrequests
description: Returns a specific pull request comment.
summary: Atlassian Get A Comment On A Pull Request
responses:
'200':
description: The comment.
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 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: atlassianGetACommentOnAPullRequest
put:
tags:
- Pullrequests
description: Updates a specific pull request comment.
summary: Atlassian Update A Comment On A Pull Request
responses:
'200':
description: The updated comment.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest_comment'
'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'
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: atlassianUpdateACommentOnAPullRequest
/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve:
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:
- Pullrequests
description: Needs a more full description created.
summary: Atlassian Reopen A Comment Thread
responses:
'204':
description: The comment is reopened.
'403':
description: 'If the authenticated user does not have access to the pull request,
or if the provided comment is not a top-level comment.'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment does not exist, or if the comment has not been resolved
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: atlassianReopenACommentThread
post:
tags:
- Pullrequests
description: Needs a more full description created.
summary: Atlassian Resolve A Comment Thread
responses:
'200':
description: The comment resolution details.
content:
application/json:
schema:
$ref: '#/components/schemas/comment_resolution'
'403':
description: 'If the authenticated user does not have access to the pull request,
if the provided comment is not a top-level comment,
or if the comment is not on the diff.'
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the comment does not exist.
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'409':
description: If the comment has already been resolved.
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: atlassianResolveACommentThread
/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:
- Pullrequests
description: Returns a paginated list of the pull request's commits.
These are the commits that are being merged into the destination
branch when the pull requests gets accepted.
summary: Atlassian List Commits On A 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: atlassianListCommitsOnAPullRequest
/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:
- Pullrequests
description: Declines the pull request.
summary: Atlassian Decline A Pull Request
responses:
'200':
description: The pull request was successfully declined.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
'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: atlassianDeclineAPullRequest
/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:
- Pullrequests
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.
summary: Atlassian List Changes In A 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: atlassianListChangesInAPullRequest
/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:
- Pullrequests
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 the pull request.
summary: Atlassian Get The Diff Stat For A 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: atlassianGetTheDiffStatForAPullRequest
/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:
- Pullrequests
description: Merges the pull request.
summary: Atlassian Merge A Pull Request
responses:
'200':
description: The pull request object.
content:
application/json:
schema:
$ref: '#/components/schemas/pullrequest'
'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'
security:
- oauth2:
- pullrequest:write
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- read:pullrequest:bitbucket
- write:pullrequest:bitbucket
operationId: atlassianMergeAPullRequest
/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:
- Pullrequests
description: 'When merging a pull request takes too long, the client receives a
task ID along with a 202 status code. The task ID can be used in a call
to this endpoint to check the status of a merge task.
```
curl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/
```
If the merge task is not yet finished, a PENDING status will be returned.
```
HTTP/2 200
{
"task_status": "PENDING",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/"
}
}
}
```
If the merge was successful, a SUCCESS status will be returned.
```
HTTP/2 200
{
"task_status": "SUCCESS",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/"
}
},
"merge_result":
}
```
If the merge task failed, an error will be returned.
```
{
"type": "error",
"error": {
"message": ""
}
}
```'
summary: Atlassian Get The Merge Task Status For A 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: atlassianGetTheMergeTaskStatusForAPullRequest
/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:
- Pullrequests
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.
summary: Atlassian Get The Patch For A 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: atlassianGetThePatchForAPullRequest
/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:
- Pullrequests
description: Needs a more full description created.
summary: Atlassian Remove Change Request For A 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: atlassianRemoveChangeRequestForAPullRequest
post:
tags:
- Pullrequests
description: Needs a more full description created.
summary: Atlassian Request Changes For A 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'
'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: atlassianRequestChangesForAPullRequest
/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:
- Pullrequests
description: Returns a paginated list of the pull request's tasks.
This endpoint supports filtering and sorting of the results by the 'task' field.
See [filtering and sorting](/cloud/bitbucket/rest/intro/#filtering) for more details.
summary: Atlassian List Tasks On A 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'
'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: atlassianListTasksOnAPullRequest
post:
tags:
- Pullrequests
description: Creates a new pull request task.
Returns the newly created pull request task.
Tasks can optionally be created in relation to a comment specified by the comment's ID which
will cause the task to appear below the comment on a pull request when viewed in Bitbucket.
summary: Atlassian Create A Task On A 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'
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: atlassianCreateATaskOnAPullRequest
/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests:
get:
tags:
- Pullrequests
summary: Atlassian List Pull Requests That Contain A Commit
description: Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.
operationId: atlassianGetpullrequestsforcommit
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'
'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: []
/repositories/{workspace}/{repo_slug}/default-reviewers:
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:
- Pullrequests
description: Returns the repository's default reviewers.
These are the users that are automatically added as reviewers on every
new pull request that is created. To obtain the repository's default reviewers
as well as the default reviewers inherited from the project, use the
[effective-default-reveiwers](#api-repositories-workspace-repo-slug-effective-default-reviewers-get) endpoint.
summary: Atlassian List Default Reviewers
responses:
'200':
description: The paginated list of default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_accounts'
'403':
description: If the authenticated user does not have access to view the default reviewers
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: atlassianListDefaultReviewers
/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}:
parameters:
- name: repo_slug
in: path
description: 'This can either be the repository slug or the UUID of the repository,
surrounded by curly-braces, for example: `{repository UUID}`.
'
required: true
schema:
type: string
- name: target_username
in: path
description: 'This can either be the username or the UUID of the default reviewer,
surrounded by curly-braces, for example: `{account UUID}`.
'
required: true
schema:
type: string
- name: workspace
in: path
description: 'This can either be the workspace ID (slug) or the workspace UUID
surrounded by curly-braces, for example: `{workspace UUID}`.
'
required: true
schema:
type: string
delete:
tags:
- Pullrequests
description: Removes a default reviewer from the repository.
summary: Atlassian Remove A User From The Default Reviewers
responses:
'204':
description: The specified user successfully removed from the default reviewers
'403':
description: If the authenticated user does not have access modify the default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the specified user does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: atlassianRemoveAUserFromTheDefaultReviewers
get:
tags:
- Pullrequests
description: Returns the specified reviewer.
This can be used to test whether a user is among the repository's
default reviewers list. A 404 indicates that that specified user is not
a default reviewer.
summary: Atlassian Get A Default Reviewer
responses:
'200':
description: The specified user is a default reviewer
content:
application/json:
schema:
$ref: '#/components/schemas/account'
'403':
description: If the authenticated user does not have access to check if the specified user is a default reviewer
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the specified user does not exist or is not a default reviewer
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: atlassianGetADefaultReviewer
put:
tags:
- Pullrequests
description: Adds the specified user to the repository's list of default
reviewers.
This method is idempotent. Adding a user a second time has no effect.
summary: Atlassian Add A User To The Default Reviewers
responses:
'200':
description: The specified user was successfully added to the default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/account'
'400':
description: If the authenticated user tried to add a team, bot user, or user without access to the repository to the default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'403':
description: If the authenticated user does not have permission to modify the default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/error'
'404':
description: If the specified user does not exist
content:
application/json:
schema:
$ref: '#/components/schemas/error'
security:
- oauth2:
- repository:admin
- basic: []
- api_key: []
x-atlassian-oauth2-scopes:
- state: Current
scheme: oauth2
scopes:
- admin:repository:bitbucket
operationId: atlassianAddAUserToTheDefaultReviewers
/repositories/{workspace}/{repo_slug}/effective-default-reviewers:
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:
- Pullrequests
description: Returns the repository's effective default reviewers. This includes both default
reviewers defined at the repository level as well as those inherited from its project.
These are the users that are automatically added as reviewers on every
new pull request that is created.
summary: Atlassian List Effective Default Reviewers
responses:
'200':
description: The paginated list of effective default reviewers
content:
application/json:
schema:
$ref: '#/components/schemas/paginated_default_reviewer_and_type'
examples:
response:
value:
pagelen: 20
values:
- user:
display_name: Patrick Wolf
uuid: '{9565301a-a3cf-4b5d-88f4-dd6af8078d7e}'
reviewer_type: project
type: default_reviewer
- user:
display_name: Davis Lee
uuid: '{f0e0e8e9-66c1-4b85-a784-44a9eb9ef1a6}'
reviewer_type: repository
type: default_reviewer
page: 1
size: 2
'403':
description: If the authenticated user does not have access to view the default reviewers
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: atlassianListEffectiveDefaultReviewers
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
comment:
$ref: '#/components/schemas/comment'
pending:
type: boolean
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
page:
type: integer
description: Page number of the current results. This is an optional element that is not provided in all responses.
minimum: 1
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
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
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
values:
type: array
items:
$ref: '#/components/schemas/A_pullrequest_comment_task'
minItems: 0
uniqueItems: true
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
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
required:
- type
additionalProperties: true
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_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_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
page:
type: integer
description: Page number of the current results. This is an optional element that is not provided in all responses.
minimum: 1
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
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
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
values:
type: array
items:
$ref: '#/components/schemas/pullrequest'
minItems: 0
uniqueItems: true
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
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
commit:
type: object
title: Pull Request Commit
properties:
hash:
type: string
pattern: '[0-9a-f]{7,}?'
additionalProperties: false
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_accounts:
type: object
title: Paginated Accounts
description: A paginated list of accounts.
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
page:
type: integer
description: Page number of the current results. This is an optional element that is not provided in all responses.
minimum: 1
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
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
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
values:
type: array
items:
$ref: '#/components/schemas/account'
minItems: 0
uniqueItems: true
additionalProperties: false
user_links:
allOf:
- $ref: '#/components/schemas/account_links'
- type: object
title: User Links
description: Links related to a User.
properties:
self:
$ref: '#/components/schemas/link'
html:
$ref: '#/components/schemas/link'
repositories:
$ref: '#/components/schemas/link'
additionalProperties: true
comment_resolution:
type: object
title: Comment Resolution
description: The resolution object for a Comment.
properties:
type:
type: string
user:
$ref: '#/components/schemas/account'
created_on:
type: string
description: The ISO8601 timestamp the resolution was created.
format: date-time
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
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
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
message:
type: string
description: The commit message that will be used on the resulting commit.
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
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
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
name:
type: string
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
created_on:
type: string
format: date-time
updated_on:
type: string
format: date-time
state:
type: string
enum:
- RESOLVED
- UNRESOLVED
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
creator:
$ref: '#/components/schemas/account'
pending:
type: boolean
resolved_on:
type: string
description: The ISO8601 timestamp for when the task was resolved.
format: date-time
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
paginated_default_reviewer_and_type:
type: object
title: Paginated Default Reviewer and Type
description: A paginated list of default reviewers with reviewer type.
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
page:
type: integer
description: Page number of the current results. This is an optional element that is not provided in all responses.
minimum: 1
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
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
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
values:
type: array
items:
$ref: '#/components/schemas/default_reviewer_and_type'
minItems: 0
uniqueItems: true
additionalProperties: false
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
default_reviewer_and_type:
type: object
title: Default Reviewer and Type
description: Object containing a user that is a default reviewer and the type of reviewer
properties:
type:
type: string
reviewer_type:
type: string
user:
$ref: '#/components/schemas/user'
required:
- type
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
page:
type: integer
description: Page number of the current results. This is an optional element that is not provided in all responses.
minimum: 1
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
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
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
values:
type: array
items:
$ref: '#/components/schemas/pullrequest_comment'
minItems: 0
uniqueItems: true
additionalProperties: false
user:
allOf:
- $ref: '#/components/schemas/account'
- type: object
title: User
description: A user object.
properties:
links:
$ref: '#/components/schemas/user_links'
account_id:
type: string
description: The user's Atlassian account ID.
account_status:
type: string
description: The status of the account. Currently the only possible value is "active", but more values may be added in the future.
has_2fa_enabled:
type: boolean
nickname:
type: string
description: Account name defined by the owner. Should be used instead of the "username" field. Note that "nickname" cannot be used in place of "username" in URLs and queries, as "nickname" is not guaranteed to be unique.
is_staff:
type: boolean
website:
type: string
additionalProperties: true
ref:
type: object
title: Ref
description: A ref object, representing a branch or tag in a repository.
properties:
type:
type: string
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
name:
type: string
description: The name of the ref.
target:
$ref: '#/components/schemas/commit'
required:
- type
additionalProperties: true
examples:
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 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/