The issue resources provide functionality for getting information on issues in an issue tracker, creating new issues, updating them and deleting them. You can access public issues without authentication, but you can't gain access to private repositories' issues. By authenticating, you will get the ability to create issues, as well as access to updating data or deleting issues you have access to. Issue Tracker features are not supported for repositories in workspaces administered through admin.atlassian.com.
Returns the components that have been defined in the issue tracker. This resource is only available on repositories that have the issue tracker enabled.
issue
string
Requiredstring
RequiredThe components that have been defined in the issue tracker.
A paginated list of issue tracker components.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/components' \
--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
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"id": 2154
}
]
}
Returns the specified issue tracker component object.
issue
integer
Requiredstring
Requiredstring
RequiredThe specified component object.
allOf [object, Component]
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 component as defined in a repository's issue tracker.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/components/{component_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"id": 2154
}
Returns the issues in the issue tracker.
issue
string
Requiredstring
RequiredA paginated list of the issues matching any filter criteria that were provided.
A paginated list of issues.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues' \
--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
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
}
]
}
Creates a new issue.
This call requires authentication. Private repositories or private issue trackers require the caller to authenticate with an account that has appropriate authorization.
The authenticated user is used for the issue's reporter
field.
issue:write
string
Requiredstring
RequiredThe new issue. The only required element is title
. All other elements can be omitted from the body.
allOf [object, Issue]
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 issue.
The newly created issue.
string
allOf [object, Issue]
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 issue.
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
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues' \
--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>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<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
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
}
A POST request to this endpoint initiates a new background celery task that archives the repo's issues.
When the job has been accepted, it will return a 202 (Accepted) along with a unique url to this job in the 'Location' response header. This url is the endpoint for where the user can obtain their zip files."
issue
repository:admin
string
Requiredstring
RequiredThe options to apply to the export. Available options include project_key
and project_name
which, if specified, are used as the project key and name in the exported Jira json format. Option send_email
specifies whether an email should be sent upon export result. Option include_attachments
specifies whether attachments are included in the export.
string
Requiredstring
string
boolean
boolean
any
The export job has been accepted
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}/issues/export' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"project_key": "<string>",
"project_name": "<string>",
"send_email": true,
"include_attachments": true
}'
This endpoint is used to poll for the progress of an issue export job and return the zip file after the job is complete. As long as the job is running, this will return a 202 response with in the response body a description of the current status.
After the job has been scheduled, but before it starts executing, the endpoint
returns a 202 response with status ACCEPTED
.
Once it starts running, it is a 202 response with status STARTED
and progress filled.
After it is finished, it becomes a 200 response with status SUCCESS
or FAILURE
.
issue
repository:admin
string
Requiredstring
Requiredstring
Requiredstring
RequiredExport job accepted
The status of an import or export job
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "issue_job_status",
"status": "ACCEPTED",
"phase": "Initializing",
"total": 0,
"count": 0,
"pct": 0
}
When using GET, this endpoint reports the status of the current import task.
After the job has been scheduled, but before it starts executing, the endpoint
returns a 202 response with status ACCEPTED
.
Once it starts running, it is a 202 response with status STARTED
and progress filled.
After it is finished, it becomes a 200 response with status SUCCESS
or FAILURE
.
issue:write
repository:admin
string
Requiredstring
RequiredImport job complete with either FAILURE or SUCCESS status
The status of an import or export job
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/import' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"status": "ACCEPTED",
"phase": "<string>",
"total": 50,
"count": 52,
"pct": 50
}
A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All existing issues will be deleted and replaced by the contents of the imported zip file.
Imports are done through a multipart/form-data POST. There is one valid and required form field, with the name "archive," which needs to be a file field:
1
$ curl -u <username> -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/issues/import
issue:write
repository:admin
string
Requiredstring
RequiredImport job accepted
The status of an import or export job
1
2
3
4
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/import' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "issue_job_status",
"status": "ACCEPTED",
"phase": "Attachments",
"total": 15,
"count": 0,
"percent": 0
}
Returns the specified issue.
issue
string
Requiredstring
Requiredstring
RequiredThe issue object.
allOf [object, Issue]
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 issue.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_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
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
}
Modifies the issue.
1 2 3 4 5 6 7 8 9 10 11 12 13
$ curl https://api.bitbucket.org/2.0/repostories/evzijst/dogslow/issues/123 \ -u evzijst -s -X PUT -H 'Content-Type: application/json' \ -d '{ "title": "Updated title", "assignee": { "account_id": "5d5355e8c6b9320d9ea5b28d" }, "priority": "minor", "version": { "name": "1.0" }, "component": null }'
This example changes the title
, assignee
, priority
and the
version
. It also removes the value of the component
from the issue
by setting the field to null
. Any field not present keeps its existing
value.
Each time an issue is edited in the UI or through the API, an immutable
change record is created under the /issues/123/changes
endpoint. It
also has a comment associated with the change.
issue:write
string
Requiredstring
Requiredstring
RequiredThe updated issue object.
allOf [object, Issue]
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 issue.
1
2
3
4
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_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
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
}
Deletes the specified issue. This requires write access to the repository.
issue:write
string
Requiredstring
Requiredstring
RequiredIndicates the issue was deleted successfully.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}' \
--header 'Authorization: Bearer <access_token>'
Returns all attachments for this issue. This returns the files' meta data. This does not return the files' actual contents. The files are always ordered by their upload date.
issue
string
Requiredstring
Requiredstring
RequiredA paginated list of all attachments for this issue.
A paginated list of issue attachments.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments' \
--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>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>"
}
]
}
Upload new issue attachments.
To upload files, perform a multipart/form-data
POST containing one
or more file fields.
When a file is uploaded with the same name as an existing attachment, then the existing file will be replaced.
issue:write
string
Requiredstring
Requiredstring
RequiredAn empty response document.
string
1
2
3
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments' \
--header 'Authorization: Bearer <access_token>'
Returns the contents of the specified file attachment.
Note that this endpoint does not return a JSON response, but instead returns a redirect pointing to the actual file that in turn will return the raw contents.
The redirect URL contains a one-time token that has a limited lifetime. As a result, the link should not be persisted, stored, or shared.
issue
string
Requiredstring
Requiredstring
Requiredstring
RequiredA redirect to the file's contents
string
1
2
3
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}' \
--header 'Authorization: Bearer <access_token>'
Deletes an attachment.
issue:write
string
Requiredstring
Requiredstring
Requiredstring
RequiredIndicates that the deletion was successful
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}' \
--header 'Authorization: Bearer <access_token>'
Returns the list of all changes that have been made to the specified issue. Changes are returned in chronological order with the oldest change first.
Each time an issue is edited in the UI or through the API, an immutable
change record is created under the /issues/123/changes
endpoint. It
also has a comment associated with the change.
Note that this operation is changing significantly, due to privacy changes. See the announcement for details.
Changes support filtering and sorting that can be used to search for specific changes. For instance, to see when an issue transitioned to "resolved":
1 2
$ curl -s https://api.bitbucket.org/2.0/repositories/site/master/issues/1/changes \ -G --data-urlencode='q=changes.state.new = "resolved"'
This resource is only available on repositories that have the issue tracker enabled.
N.B.
The changes.assignee
and changes.assignee_account_id
fields are not
a user
object. Instead, they contain the raw username
and
account_id
of the user. This is to protect the integrity of the audit
log even after a user account gets deleted.
The changes.assignee
field is deprecated will disappear in the
future. Use changes.assignee_account_id
instead.
issue
string
Requiredstring
Requiredstring
Requiredstring
string
Returns all the issue changes that were made on the specified issue.
A paginated list of issue changes.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes' \
--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
{
"pagelen": 20,
"values": [
{
"changes": {
"priority": {
"new": "trivial",
"old": "major"
},
"assignee": {
"new": "",
"old": "evzijst"
},
"assignee_account_id": {
"new": "",
"old": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443"
},
"kind": {
"new": "enhancement",
"old": "bug"
}
},
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1/changes/2"
},
"html": {
"href": "https://bitbucket.org/evzijst/dogslow/issues/1#comment-2"
}
},
"issue": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow/issues/1"
}
},
"type": "issue",
"id": 1,
"repository": {
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/evzijst/dogslow"
},
"html": {
"href": "https://bitbucket.org/evzijst/dogslow"
},
"avatar": {
"href": "https://bitbucket.org/evzijst/dogslow/avatar/32/"
}
},
"type": "repository",
"name": "dogslow",
"full_name": "evzijst/dogslow",
"uuid": "{988b17c6-1a47-4e70-84ee-854d5f012bf6}"
},
"title": "Updated title"
},
"created_on": "2018-03-03T00:35:28.353630+00:00",
"user": {
"username": "evzijst",
"nickname": "evzijst",
"display_name": "evzijst",
"type": "user",
"uuid": "{aaa7972b-38af-4fb1-802d-6e3854c95778}",
"links": {
"self": {
"href": "https://api.bitbucket.org/2.0/users/evzijst"
},
"html": {
"href": "https://bitbucket.org/evzijst/"
},
"avatar": {
"href": "https://bitbucket.org/account/evzijst/avatar/32/"
}
}
},
"message": {
"raw": "Removed assignee, changed kind and priority.",
"markup": "markdown",
"html": "<p>Removed assignee, changed kind and priority.</p>",
"type": "rendered"
},
"type": "issue_change",
"id": 2
}
],
"page": 1
}
Makes a change to the specified issue.
For example, to change an issue's state and assignee, create a new change object that modifies these fields:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
curl https://api.bitbucket.org/2.0/site/master/issues/1234/changes \ -s -u evzijst -X POST -H "Content-Type: application/json" \ -d '{ "changes": { "assignee_account_id": { "new": "557058:c0b72ad0-1cb5-4018-9cdc-0cde8492c443" }, "state": { "new": 'resolved" } } "message": { "raw": "This is now resolved." } }'
The above example also includes a custom comment to go alongside the change. This comment will also be visible on the issue page in the UI.
The fields of the changes
object are strings, not objects. This
allows for immutable change log records, even after user accounts,
milestones, or other objects recorded in a change entry, get renamed or
deleted.
The assignee_account_id
field stores the account id. When POSTing a
new change and changing the assignee, the client should therefore use
the user's account_id in the changes.assignee_account_id.new
field.
This call requires authentication. Private repositories or private issue trackers require the caller to authenticate with an account that has appropriate authorization.
issue:write
string
Requiredstring
Requiredstring
RequiredThe new issue state change. The only required elements are changes.[].new
. All other elements can be omitted from the body.
string
Requiredobject
string
string
allOf [object, Account]
allOf [object, Issue]
object
object
any
The newly created issue change.
string
An issue change.
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
131
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"issue": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"created_on": "<string>",
"user": {
"type": "<string>",
"links": {},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
},
"issue": {
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"changes": {
"assignee": {
"old": "<string>",
"new": "<string>"
},
"state": {
"old": "<string>",
"new": "<string>"
},
"title": {
"old": "<string>",
"new": "<string>"
},
"kind": {
"old": "<string>",
"new": "<string>"
},
"milestone": {
"old": "<string>",
"new": "<string>"
},
"component": {
"old": "<string>",
"new": "<string>"
},
"priority": {
"old": "<string>",
"new": "<string>"
},
"version": {
"old": "<string>",
"new": "<string>"
},
"content": {
"old": "<string>",
"new": "<string>"
}
},
"message": {
"raw": "<string>",
"markup": "markdown",
"html": "<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
126
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"issue": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"created_on": "<string>",
"user": {
"type": "<string>",
"links": {},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
},
"issue": {
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"changes": {
"assignee": {
"old": "<string>",
"new": "<string>"
},
"state": {
"old": "<string>",
"new": "<string>"
},
"title": {
"old": "<string>",
"new": "<string>"
},
"kind": {
"old": "<string>",
"new": "<string>"
},
"milestone": {
"old": "<string>",
"new": "<string>"
},
"component": {
"old": "<string>",
"new": "<string>"
},
"priority": {
"old": "<string>",
"new": "<string>"
},
"version": {
"old": "<string>",
"new": "<string>"
},
"content": {
"old": "<string>",
"new": "<string>"
}
},
"message": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
}
Returns the specified issue change object. This resource is only available on repositories that have the issue tracker enabled.
issue
string
Requiredstring
Requiredstring
Requiredstring
RequiredThe specified issue change object.
An issue change.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_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
126
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"issue": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"created_on": "<string>",
"user": {
"type": "<string>",
"links": {},
"created_on": "<string>",
"display_name": "<string>",
"uuid": "<string>"
},
"issue": {
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
},
"html": {
"href": "<string>",
"name": "<string>"
},
"comments": {
"href": "<string>",
"name": "<string>"
},
"attachments": {
"href": "<string>",
"name": "<string>"
},
"watch": {
"href": "<string>",
"name": "<string>"
},
"vote": {
"href": "<string>",
"name": "<string>"
}
},
"id": 2154,
"repository": {
"type": "<string>"
},
"title": "<string>",
"reporter": {
"type": "<string>"
},
"assignee": {
"type": "<string>"
},
"created_on": "<string>",
"updated_on": "<string>",
"edited_on": "<string>",
"state": "submitted",
"kind": "bug",
"priority": "trivial",
"milestone": {
"type": "<string>"
},
"version": {
"type": "<string>"
},
"component": {
"type": "<string>"
},
"votes": 2154,
"content": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
},
"changes": {
"assignee": {
"old": "<string>",
"new": "<string>"
},
"state": {
"old": "<string>",
"new": "<string>"
},
"title": {
"old": "<string>",
"new": "<string>"
},
"kind": {
"old": "<string>",
"new": "<string>"
},
"milestone": {
"old": "<string>",
"new": "<string>"
},
"component": {
"old": "<string>",
"new": "<string>"
},
"priority": {
"old": "<string>",
"new": "<string>"
},
"version": {
"old": "<string>",
"new": "<string>"
},
"content": {
"old": "<string>",
"new": "<string>"
}
},
"message": {
"raw": "<string>",
"markup": "markdown",
"html": "<string>"
}
}
Returns a paginated list of all comments that were made on the specified issue.
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.
issue
string
Requiredstring
Requiredstring
Requiredstring
A paginated list of issue comments.
A paginated list of issue comments.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_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
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"issue": {
"type": "<string>"
}
}
]
}
Creates a new issue comment.
1 2 3 4
$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/ \ -X POST -u evzijst \ -H 'Content-Type: application/json' \ -d '{"content": {"raw": "Lorem ipsum."}}'
issue:write
string
Requiredstring
Requiredstring
RequiredThe new issue comment object.
allOf [allOf [object, Comment], Issue 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 issue comment.
The newly created comment.
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
curl --request POST \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments' \
--header 'Authorization: Bearer <access_token>' \
--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>"
}
},
"issue": {
"type": "<string>"
}
}'
Returns the specified issue comment object.
issue
integer
Requiredstring
Requiredstring
Requiredstring
RequiredThe issue comment.
allOf [allOf [object, Comment], Issue 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 issue comment.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_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
{
"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>"
}
},
"issue": {
"type": "<string>"
}
}
Updates the content of the specified issue comment. Note that only
the content.raw
field can be modified.
1 2 3 4
$ curl https://api.bitbucket.org/2.0/repositories/atlassian/prlinks/issues/42/comments/5728901 \ -X PUT -u evzijst \ -H 'Content-Type: application/json' \ -d '{"content": {"raw": "Lorem ipsum."}'
issue:write
integer
Requiredstring
Requiredstring
Requiredstring
RequiredThe updated comment.
allOf [allOf [object, Comment], Issue 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 issue comment.
The updated issue comment.
allOf [allOf [object, Comment], Issue 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 issue 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
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_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>"
}
},
"issue": {
"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
{
"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>"
}
},
"issue": {
"type": "<string>"
}
}
Deletes the specified comment.
issue:write
integer
Requiredstring
Requiredstring
Requiredstring
RequiredIndicates successful deletion.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}' \
--header 'Authorization: Bearer <access_token>'
Check whether the authenticated user has voted for this issue. A 204 status code indicates that the user has voted, while a 404 implies they haven't.
account
issue
string
Requiredstring
Requiredstring
RequiredIf the authenticated user has not voted for this issue.
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
.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"error": {
"message": "<string>",
"detail": "<string>",
"data": {}
}
}
Vote for this issue. To cast your vote, do an empty PUT. The 204 status code indicates that the operation was successful.
account:write
issue
string
Requiredstring
Requiredstring
RequiredIndicating the authenticated user has cast their vote successfully.
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
.
1
2
3
4
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"error": {
"message": "<string>",
"detail": "<string>",
"data": {}
}
}
Retract your vote.
account:write
issue:write
string
Requiredstring
Requiredstring
RequiredUnexpected error.
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
.
1
2
3
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote' \
--header 'Authorization: Bearer <access_token>'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"error": {
"message": "<string>",
"detail": "<string>",
"data": {}
}
}
Indicated whether or not the authenticated user is watching this issue.
account
issue
string
Requiredstring
Requiredstring
RequiredIf the authenticated user is watching this issue.
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
.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"error": {
"message": "<string>",
"detail": "<string>",
"data": {}
}
}
Start watching this issue. To start watching this issue, do an empty PUT. The 204 status code indicates that the operation was successful.
account:write
issue
string
Requiredstring
Requiredstring
RequiredIndicates that the authenticated user successfully started watching this issue.
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
.
1
2
3
4
curl --request PUT \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"error": {
"message": "<string>",
"detail": "<string>",
"data": {}
}
}
Stop watching this issue.
account:write
issue:write
string
Requiredstring
Requiredstring
RequiredIndicates that the authenticated user successfully stopped watching this issue.
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
.
1
2
3
4
curl --request DELETE \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
{
"type": "<string>",
"error": {
"message": "<string>",
"detail": "<string>",
"data": {}
}
}
Returns the milestones that have been defined in the issue tracker. This resource is only available on repositories that have the issue tracker enabled.
issue
string
Requiredstring
RequiredThe milestones that have been defined in the issue tracker.
A paginated list of issue tracker milestones.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/milestones' \
--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
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"id": 2154
}
]
}
Returns the specified issue tracker milestone object.
issue
integer
Requiredstring
Requiredstring
RequiredThe specified milestone object.
allOf [object, Milestone]
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 milestone as defined in a repository's issue tracker.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"id": 2154
}
Returns the versions that have been defined in the issue tracker. This resource is only available on repositories that have the issue tracker enabled.
issue
string
Requiredstring
RequiredThe versions that have been defined in the issue tracker.
A paginated list of issue tracker versions.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/versions' \
--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
{
"size": 142,
"page": 102,
"pagelen": 159,
"next": "<string>",
"previous": "<string>",
"values": [
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"id": 2154
}
]
}
Returns the specified issue tracker version object.
issue
string
Requiredinteger
Requiredstring
RequiredThe specified version object.
allOf [object, Version]
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 version as defined in a repository's issue tracker.
1
2
3
4
curl --request GET \
--url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/versions/{version_id}' \
--header 'Authorization: Bearer <access_token>' \
--header 'Accept: application/json'
1
2
3
4
5
6
7
8
9
10
11
{
"type": "<string>",
"links": {
"self": {
"href": "<string>",
"name": "<string>"
}
},
"name": "<string>",
"id": 2154
}
Rate this page: