Pull requests are a feature that makes it easier for developers to collaborate using Bitbucket. They provide a user-friendly web interface for discussing proposed changes before integrating them into the official project.
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 for more details.
pullrequest
string
Requiredstring
All pull requests authored by the specified user.
A paginated list of pullrequests.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/pullrequests/{selected_user}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {},
"destination": {},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
]
}
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.
pullrequest
read:pullrequest:bitbucket
string
Requiredstring
Requiredstring
Requiredinteger
integer
The paginated list of pull requests.
A paginated list of pullrequests.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {},
"destination": {},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
]
}
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 endpoint.
pullrequest
read:pullrequest:bitbucket
string
Requiredstring
RequiredThe paginated list of default reviewers
A paginated list of accounts.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/default-reviewers' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
}
]
}
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.
pullrequest
read:pullrequest:bitbucket
string
Requiredstring
Requiredstring
RequiredThe specified user is a default reviewer
allOf [object, Account]
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
.
An account object.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"type": "<string>",
"links": {
"avatar": {}
},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
}
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.
repository:admin
admin:repository:bitbucket
string
Requiredstring
Requiredstring
RequiredThe specified user was successfully added to the default reviewers
allOf [object, Account]
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
.
An account object.
1
2
3
4
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
{
"type": "<string>",
"links": {
"avatar": {}
},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
}
Removes a default reviewer from the repository.
repository:admin
admin:repository:bitbucket
string
Requiredstring
Requiredstring
RequiredThe specified user successfully removed from the default reviewers
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}' \
--header 'Authorization: Bearer <access_token>'
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.
pullrequest
read:pullrequest:bitbucket
string
Requiredstring
RequiredThe paginated list of effective default reviewers
A paginated list of default reviewers with reviewer type.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/effective-default-reviewers' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
"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
}
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 for more details.
pullrequest
read:pullrequest:bitbucket
string
Requiredstring
Requiredstring
All pull requests on the specified repository.
A paginated list of pullrequests.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {},
"destination": {},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
]
}
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.
1 2 3 4 5 6 7 8 9 10 11 12
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
):
1 2 3 4 5 6 7 8 9 10 11 12 13
{ "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.
1 2 3 4 5 6 7 8 9 10 11 12 13
{ "title": "My Title", "source": { "branch": { "name": "my-feature-branch" } }, "reviewers": [ { "uuid": "{504c3b62-8120-4f0c-a7bc-87800b9d6f70}" } ] }
Other fields:
description
- a stringclose_source_branch
- boolean that specifies if the source branch should be closed upon mergingpullrequest:write
read:pullrequest:bitbucket
, write:pullrequest:bitbucket
string
Requiredstring
RequiredThe 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.
allOf [object, Pull Request]
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
.
A pull request object.
The newly created pull request.
string
allOf [object, Pull Request]
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
.
A pull request object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
{ "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": "<p>inline with to a dn from lines</p>", "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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
{ "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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
{ "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" } } ] }
pullrequest
read:pullrequest:bitbucket
string
Requiredstring
RequiredThe pull request activity log
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/activity' \
--header 'Authorization: Bearer <access_token>'
Returns the specified pull request.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe pull request object
allOf [object, Pull Request]
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
.
A pull request object.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
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.
pullrequest:write
read:pullrequest:bitbucket
, write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe pull request that is to be updated.
allOf [object, Pull Request]
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
.
A pull request object.
The updated pull request
allOf [object, Pull Request]
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
.
A pull request object.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
{ "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": "<p>inline with to a dn from lines</p>", "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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
{ "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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
{ "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" } } ] }
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe pull request activity log
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity' \
--header 'Authorization: Bearer <access_token>'
Approve the specified pull request as the authenticated user.
pullrequest:write
read:pullrequest:bitbucket
, write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe participant
object recording that the authenticated user approved the pull request.
allOf [object, Participant]
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
.
Object describing a user's role on resources like commits or pull requests.
1
2
3
4
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
{
"type": "<string>",
"user": {
"type": "<string>"
},
"role": "PARTICIPANT",
"approved": true,
"state": "approved",
"participated_on": "<string>"
}
Redact the authenticated user's approval of the specified pull request.
pullrequest:write
write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredAn empty response indicating the authenticated user's approval has been withdrawn.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve' \
--header 'Authorization: Bearer <access_token>'
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 for more details.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredA paginated list of comments made on the given pull request, in chronological order.
A paginated list of pullrequest comments.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"pullrequest": {
"type": "<string>"
},
"resolution": {
"type": "<string>"
},
"pending": true
}
]
}
Creates a new pull request comment. Returns the newly created pull request comment.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe comment object.
allOf [allOf [object, Comment], Pull Request Comment]
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
.
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
).
A pullrequest comment.
The newly created comment.
string
allOf [allOf [object, Comment], Pull Request Comment]
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
.
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
).
A pullrequest comment.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"user": {
"type": "<string>"
},
"deleted": true,
"inline": {
"from": 57,
"to": 122,
"path": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"code": {
"href": "<string>",
"name": "<string>"
}
},
"pullrequest": {
"type": "<string>"
},
"resolution": {
"type": "<string>",
"user": {
"type": "<string>"
},
"created_on": "<string>"
},
"pending": true
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"type": "<string>",
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"user": {
"type": "<string>"
},
"deleted": true,
"inline": {
"from": 57,
"to": 122,
"path": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"code": {
"href": "<string>",
"name": "<string>"
}
},
"pullrequest": {
"type": "<string>"
},
"resolution": {
"type": "<string>",
"user": {
"type": "<string>"
},
"created_on": "<string>"
},
"pending": true
}
Returns a specific pull request comment.
pullrequest
read:pullrequest:bitbucket
integer
Requiredinteger
Requiredstring
Requiredstring
RequiredThe comment.
allOf [allOf [object, Comment], Pull Request Comment]
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
.
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
).
A pullrequest comment.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"type": "<string>",
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"user": {
"type": "<string>"
},
"deleted": true,
"inline": {
"from": 57,
"to": 122,
"path": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"code": {
"href": "<string>",
"name": "<string>"
}
},
"pullrequest": {
"type": "<string>"
},
"resolution": {
"type": "<string>",
"user": {
"type": "<string>"
},
"created_on": "<string>"
},
"pending": true
}
Updates a specific pull request comment.
pullrequest
read:pullrequest:bitbucket
integer
Requiredinteger
Requiredstring
Requiredstring
RequiredThe contents of the updated comment.
allOf [allOf [object, Comment], Pull Request Comment]
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
.
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
).
A pullrequest comment.
The updated comment.
allOf [allOf [object, Comment], Pull Request Comment]
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
.
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
).
A pullrequest comment.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"user": {
"type": "<string>"
},
"deleted": true,
"inline": {
"from": 57,
"to": 122,
"path": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"code": {
"href": "<string>",
"name": "<string>"
}
},
"pullrequest": {
"type": "<string>"
},
"resolution": {
"type": "<string>",
"user": {
"type": "<string>"
},
"created_on": "<string>"
},
"pending": true
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
"type": "<string>",
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"user": {
"type": "<string>"
},
"deleted": true,
"inline": {
"from": 57,
"to": 122,
"path": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"code": {
"href": "<string>",
"name": "<string>"
}
},
"pullrequest": {
"type": "<string>"
},
"resolution": {
"type": "<string>",
"user": {
"type": "<string>"
},
"created_on": "<string>"
},
"pending": true
}
Deletes a specific pull request comment.
pullrequest
read:pullrequest:bitbucket
integer
Requiredinteger
Requiredstring
Requiredstring
RequiredSuccessful deletion.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}' \
--header 'Authorization: Bearer <access_token>'
pullrequest
read:pullrequest:bitbucket
integer
Requiredinteger
Requiredstring
Requiredstring
RequiredThe comment resolution details.
The resolution object for a Comment.
1
2
3
4
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"user": {
"type": "<string>",
"links": {},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
},
"created_on": "<string>"
}
pullrequest
read:pullrequest:bitbucket
integer
Requiredinteger
Requiredstring
Requiredstring
RequiredThe comment is reopened.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve' \
--header 'Authorization: Bearer <access_token>'
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.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredA 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.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits' \
--header 'Authorization: Bearer <access_token>'
Declines the pull request.
pullrequest:write
read:pullrequest:bitbucket
, write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe pull request was successfully declined.
allOf [object, Pull Request]
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
.
A pull request object.
1
2
3
4
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
Redirects to the repository diff with the revspec that corresponds to the pull request.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredRedirects to the repository diff with the revspec that corresponds to the pull request.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff' \
--header 'Authorization: Bearer <access_token>'
Redirects to the repository diffstat with the revspec that corresponds to the pull request.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredRedirects to the repository diffstat with the revspec that corresponds to pull request.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat' \
--header 'Authorization: Bearer <access_token>'
Merges the pull request.
pullrequest:write
read:pullrequest:bitbucket
, write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
Requiredboolean
string
Requiredstring
boolean
string
any
The pull request object.
allOf [object, Pull Request]
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
.
A pull request object.
1
2
3
4
5
6
7
8
9
10
11
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"message": "<string>",
"close_source_branch": true,
"merge_strategy": "merge_commit"
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"commits": {
"href": "<string>",
"name": "<string>"
},
"approve": {
"href": "<string>",
"name": "<string>"
},
"diff": {
"href": "<string>",
"name": "<string>"
},
"diffstat": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"activity": {
"href": "<string>",
"name": "<string>"
},
"merge": {
"href": "<string>",
"name": "<string>"
},
"decline": {
"href": "<string>",
"name": "<string>"
}
},
"id": 108,
"title": "<string>",
"rendered": {
"title": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"description": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"reason": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"summary": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"state": "OPEN",
"author": {
"type": "<string>"
},
"source": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"destination": {
"repository": {
"type": "<string>"
},
"branch": {
"name": "<string>",
"merge_strategies": [
"merge_commit"
],
"default_merge_strategy": "<string>"
},
"commit": {
"hash": "<string>"
}
},
"merge_commit": {
"hash": "<string>"
},
"comment_count": 51,
"task_count": 53,
"close_source_branch": true,
"closed_by": {
"type": "<string>"
},
"reason": "<string>",
"created_on": "<string>",
"updated_on": "<string>",
"reviewers": [
{
"type": "<string>"
}
],
"participants": [
{
"type": "<string>"
}
]
}
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.
1
curl -X GET https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>
If the merge task is not yet finished, a PENDING status will be returned.
1 2 3 4 5 6 7 8 9
HTTP/2 200 { "task_status": "PENDING", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>" } } }
If the merge was successful, a SUCCESS status will be returned.
1 2 3 4 5 6 7 8 9 10
HTTP/2 200 { "task_status": "SUCCESS", "links": { "self": { "href": "https://api.bitbucket.org/2.0/repositories/atlassian/bitbucket/pullrequests/2286/merge/task-status/<task_id>" } }, "merge_result": <the merged pull request object> }
If the merge task failed, an error will be returned.
1 2 3 4 5 6
{ "type": "error", "error": { "message": "<error message>" } }
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
Requiredstring
RequiredReturns a task status if the merge is either pending or successful, and if it is successful, a pull request
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}' \
--header 'Authorization: Bearer <access_token>'
Redirects to the repository patch with the revspec that corresponds to pull request.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredRedirects to the repository patch with the revspec that corresponds to pull request.
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch' \
--header 'Authorization: Bearer <access_token>'
pullrequest:write
read:pullrequest:bitbucket
, write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe participant
object recording that the authenticated user requested changes on the pull request.
allOf [object, Participant]
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
.
Object describing a user's role on resources like commits or pull requests.
1
2
3
4
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
{
"type": "<string>",
"user": {
"type": "<string>"
},
"role": "PARTICIPANT",
"approved": true,
"state": "approved",
"participated_on": "<string>"
}
pullrequest:write
write:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredAn empty response indicating the authenticated user's request for change has been withdrawn.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes' \
--header 'Authorization: Bearer <access_token>'
Returns all statuses (e.g. build results) for the given pull request.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
Requiredstring
string
A paginated list of all commit statuses for this pull request.
A paginated list of commit status objects.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"commit": {
"href": "<string>",
"name": "<string>"
}
},
"uuid": "<string>",
"key": "<string>",
"refname": "<string>",
"url": "<string>",
"state": "FAILED",
"name": "<string>",
"description": "<string>",
"created_on": "<string>",
"updated_on": "<string>"
}
]
}
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 for more details.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
Requiredstring
string
integer
A paginated list of pull request tasks for the given pull request.
A paginated list of tasks.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"created_on": "<string>",
"updated_on": "<string>",
"state": "RESOLVED",
"content": {},
"creator": {
"type": "<string>"
},
"comment": {
"type": "<string>"
}
}
]
}
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.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredstring
RequiredThe contents of the task
Task Raw Content
RequiredallOf [object, Comment]
boolean
The newly created task.
string
allOf [allOf [Task, Pull Request Task], Pull Request Comment Task]
A task object.
A pull request task.
A pullrequest comment task
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"content": {
"raw": "<string>"
},
"comment": {
"type": "<string>",
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"user": {
"type": "<string>"
},
"deleted": true,
"inline": {
"from": 57,
"to": 122,
"path": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"code": {
"href": "<string>",
"name": "<string>"
}
}
},
"pending": true
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"state": "RESOLVED",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"creator": {
"type": "<string>"
},
"pending": true,
"resolved_on": "<string>",
"resolved_by": {
"type": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
}
},
"comment": {
"type": "<string>"
}
}
Returns a specific pull request task.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredinteger
Requiredstring
RequiredThe task.
allOf [allOf [Task, Pull Request Task], Pull Request Comment Task]
A task object.
A pull request task.
A pullrequest comment task
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"state": "RESOLVED",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"creator": {
"type": "<string>"
},
"pending": true,
"resolved_on": "<string>",
"resolved_by": {
"type": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
}
},
"comment": {
"type": "<string>"
}
}
Updates a specific pull request task.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredinteger
Requiredstring
RequiredThe updated state and content of the task.
Task Raw Content
string
The updated task.
allOf [allOf [Task, Pull Request Task], Pull Request Comment Task]
A task object.
A pull request task.
A pullrequest comment task
1
2
3
4
5
6
7
8
9
10
11
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"content": {
"raw": "<string>"
},
"state": "RESOLVED"
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"id": 2154,
"created_on": "<string>",
"updated_on": "<string>",
"state": "RESOLVED",
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
},
"creator": {
"type": "<string>"
},
"pending": true,
"resolved_on": "<string>",
"resolved_by": {
"type": "<string>"
},
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
}
},
"comment": {
"type": "<string>"
}
}
Deletes a specific pull request task.
pullrequest
read:pullrequest:bitbucket
integer
Requiredstring
Requiredinteger
Requiredstring
RequiredSuccessful deletion.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}' \
--header 'Authorization: Bearer <access_token>'
Rate this page: