• Addon
  • Branch restrictions
  • Branching model
  • Commit statuses
  • Commits
  • Deployments
  • Downloads
  • Issue tracker
  • Pipelines
  • Projects
  • Pullrequests
  • Refs
  • Reports
  • Repositories
  • Snippets
  • Source
  • Ssh
  • Users
  • Webhooks
  • Workspaces
  • Other operations
Cloud
Bitbucket Cloud / Reference / REST APIs

Issue tracker

Postman Collection
OpenAPI

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.

Operations
GET/repositories/{workspace}/{repo_slug}/componentsGET/repositories/{workspace}/{repo_slug}/components/{component_id}GET/repositories/{workspace}/{repo_slug}/issuesPOST/repositories/{workspace}/{repo_slug}/issuesPOST/repositories/{workspace}/{repo_slug}/issues/exportGET/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zipGET/repositories/{workspace}/{repo_slug}/issues/importPOST/repositories/{workspace}/{repo_slug}/issues/importGET/repositories/{workspace}/{repo_slug}/issues/{issue_id}PUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachmentsPOST/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachmentsGET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changesPOST/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changesGET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/commentsPOST/repositories/{workspace}/{repo_slug}/issues/{issue_id}/commentsGET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}PUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/votePUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}/voteDEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/voteGET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watchPUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watchDEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watchGET/repositories/{workspace}/{repo_slug}/milestonesGET/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}GET/repositories/{workspace}/{repo_slug}/versionsGET/repositories/{workspace}/{repo_slug}/versions/{version_id}
GET

List components

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

The components that have been defined in the issue tracker.

application/json

Paginated Components

A paginated list of issue tracker components.

GET/repositories/{workspace}/{repo_slug}/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'
200Response
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 } ] }
GET

Get a component for issues

Returns the specified issue tracker component object.

issue

Request

Path parameters

component_id

integer

Required
repo_slug

string

Required
workspace

string

Required

Responses

The specified component object.

application/json

allOf [object, Component]

object

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.

Component

A component as defined in a repository's issue tracker.

GET/repositories/{workspace}/{repo_slug}/components/{component_id}
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'
200Response
1 2 3 4 5 6 7 8 9 10 11 { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "id": 2154 }
GET

List issues

Returns the issues in the issue tracker.

issue

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

A paginated list of the issues matching any filter criteria that were provided.

application/json

Paginated Issues

A paginated list of issues.

GET/repositories/{workspace}/{repo_slug}/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'
200Response
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>" } } ] }
POST

Create an issue

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Request bodyapplication/json

The new issue. The only required element is title. All other elements can be omitted from the body.

allOf [object, Issue]

object

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.

Issue

An issue.

Responses

The newly created issue.

Headers

Location

string

application/json

allOf [object, Issue]

object

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.

Issue

An issue.

POST/repositories/{workspace}/{repo_slug}/issues
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>" } }'
201Response
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>" } }
POST

Export issues

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Request bodyapplication/json

The 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.

type

string

Required
project_key

string

project_name

string

send_email

boolean

include_attachments

boolean

Additional Properties

any

Responses

The export job has been accepted

POST/repositories/{workspace}/{repo_slug}/issues/export
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 }'
GET

Check issue export status

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

Request

Path parameters

repo_name

string

Required
repo_slug

string

Required
task_id

string

Required
workspace

string

Required

Responses

Export job accepted

application/json

Issue Job Status

The status of an import or export job

GET/repositories/{workspace}/{repo_slug}/issues/export/{repo_name}-issues-{task_id}.zip
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'
202Response
1 2 3 4 5 6 7 8 { "type": "issue_job_status", "status": "ACCEPTED", "phase": "Initializing", "total": 0, "count": 0, "pct": 0 }
GET

Check issue import status

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

Import job complete with either FAILURE or SUCCESS status

application/json

Issue Job Status

The status of an import or export job

GET/repositories/{workspace}/{repo_slug}/issues/import
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'
200Response
1 2 3 4 5 6 7 8 { "type": "<string>", "status": "ACCEPTED", "phase": "<string>", "total": 50, "count": 52, "pct": 50 }
POST

Import issues

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

Import job accepted

application/json

Issue Job Status

The status of an import or export job

POST/repositories/{workspace}/{repo_slug}/issues/import
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'
202Response
1 2 3 4 5 6 7 8 { "type": "issue_job_status", "status": "ACCEPTED", "phase": "Attachments", "total": 15, "count": 0, "percent": 0 }
GET

Get an issue

Returns the specified issue.

issue

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The issue object.

application/json

allOf [object, Issue]

object

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.

Issue

An issue.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}
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'
200Response
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>" } }
PUT

Update an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The updated issue object.

application/json

allOf [object, Issue]

object

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.

Issue

An issue.

PUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}
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'
200Response
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>" } }
DEL

Delete an issue

Deletes the specified issue. This requires write access to the repository.

issue:write

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The issue object.

application/json

allOf [object, Issue]

object

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.

Issue

An issue.

DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}
1 2 3 4 curl --request DELETE \ --url 'https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/issues/{issue_id}' \ --header 'Authorization: Bearer <access_token>' \ --header 'Accept: application/json'
200Response
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>" } }
GET

List attachments for an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

A paginated list of all attachments for this issue.

application/json

Paginated Issue Attachment

A paginated list of issue attachments.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/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'
200Response
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>" } ] }
POST

Upload an attachment to an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

An empty response document.

Headers

Location

string

POST/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments
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>'
GET

Get attachment for an issue

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

Request

Path parameters

issue_id

string

Required
path

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

A redirect to the file's contents

Headers

Location

string

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}
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>'
DEL

Delete an attachment for an issue

Deletes an attachment.

issue:write

Request

Path parameters

issue_id

string

Required
path

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicates that the deletion was successful

DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/attachments/{path}
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>'
GET

List changes on an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Query parameters

q

string

sort

string

Responses

Returns all the issue changes that were made on the specified issue.

application/json

Paginated Log Entries

A paginated list of issue changes.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/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'
200Response
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 }
POST

Modify the state of an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Request bodyapplication/json

The new issue state change. The only required elements are changes.[].new. All other elements can be omitted from the body.

type

string

Required
links

object

name

string

created_on

string

user

allOf [object, Account]

issue

allOf [object, Issue]

changes

object

message

object

Additional Properties

any

Responses

The newly created issue change.

Headers

Location

string

application/json

Issue Change

An issue change.

POST/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes
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 132 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>", "username": "<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>" } }'
201Response
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 { "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>", "username": "<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>" } }
GET

Get issue change object

Returns the specified issue change object. This resource is only available on repositories that have the issue tracker enabled.

issue

Request

Path parameters

change_id

string

Required
issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The specified issue change object.

application/json

Issue Change

An issue change.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/changes/{change_id}
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'
200Response
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 { "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>", "username": "<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>" } }
GET

List comments on an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Query parameters

q

string

Responses

A paginated list of issue comments.

application/json

Paginated Issue Comments

A paginated list of issue comments.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/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'
200Response
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>" } } ] }
POST

Create a comment on an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Request bodyapplication/json

The new issue comment object.

allOf [allOf [object, Comment], Issue Comment]

object

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.

Comment

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).

Issue Comment

A issue comment.

Responses

The newly created comment.

Headers

Location

string

POST/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments
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>" } }'
GET

Get a comment on an issue

Returns the specified issue comment object.

issue

Request

Path parameters

comment_id

integer

Required
issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

The issue comment.

application/json

allOf [allOf [object, Comment], Issue Comment]

object

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.

Comment

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).

Issue Comment

A issue comment.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
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'
200Response
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>" } }
PUT

Update a comment on an issue

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

Request

Path parameters

comment_id

integer

Required
issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Request bodyapplication/json

The updated comment.

allOf [allOf [object, Comment], Issue Comment]

object

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.

Comment

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).

Issue Comment

A issue comment.

Responses

The updated issue comment.

application/json

allOf [allOf [object, Comment], Issue Comment]

object

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.

Comment

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).

Issue Comment

A issue comment.

PUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
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>" } }'
200Response
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>" } }
DEL

Delete a comment on an issue

Deletes the specified comment.

issue:write

Request

Path parameters

comment_id

integer

Required
issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicates successful deletion.

DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/comments/{comment_id}
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>'
GET

Check if current user voted for an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

If the authenticated user has not voted for this issue.

application/json

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.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
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'
204Response
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
PUT

Vote for an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicating the authenticated user has cast their vote successfully.

application/json

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.

PUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
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'
204Response
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
DEL

Remove vote for an issue

Retract your vote.

account:write
,
issue:write

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Unexpected error.

application/json

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.

DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/vote
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>'
defaultResponse
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
GET

Check if current user is watching a issue

Indicated whether or not the authenticated user is watching this issue.

account
,
issue

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

If the authenticated user is watching this issue.

application/json

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.

GET/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
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'
204Response
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
PUT

Watch an issue

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

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicates that the authenticated user successfully started watching this issue.

application/json

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.

PUT/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
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'
204Response
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
DEL

Stop watching an issue

Stop watching this issue.

account:write
,
issue:write

Request

Path parameters

issue_id

string

Required
repo_slug

string

Required
workspace

string

Required

Responses

Indicates that the authenticated user successfully stopped watching this issue.

application/json

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.

DEL/repositories/{workspace}/{repo_slug}/issues/{issue_id}/watch
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'
204Response
1 2 3 4 5 6 7 8 { "type": "<string>", "error": { "message": "<string>", "detail": "<string>", "data": {} } }
GET

List milestones

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

The milestones that have been defined in the issue tracker.

application/json

Paginated Milestones

A paginated list of issue tracker milestones.

GET/repositories/{workspace}/{repo_slug}/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'
200Response
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 } ] }
GET

Get a milestone

Returns the specified issue tracker milestone object.

issue

Request

Path parameters

milestone_id

integer

Required
repo_slug

string

Required
workspace

string

Required

Responses

The specified milestone object.

application/json

allOf [object, Milestone]

object

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.

Milestone

A milestone as defined in a repository's issue tracker.

GET/repositories/{workspace}/{repo_slug}/milestones/{milestone_id}
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'
200Response
1 2 3 4 5 6 7 8 9 10 11 { "type": "<string>", "links": { "self": { "href": "<string>", "name": "<string>" } }, "name": "<string>", "id": 2154 }
GET

List defined versions for issues

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

Request

Path parameters

repo_slug

string

Required
workspace

string

Required

Responses

The versions that have been defined in the issue tracker.

application/json

Paginated Versions

A paginated list of issue tracker versions.

GET/repositories/{workspace}/{repo_slug}/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'
200Response
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 } ] }
GET

Get a defined version for issues

Returns the specified issue tracker version object.

issue

Request

Path parameters

repo_slug

string

Required
version_id

integer

Required
workspace

string

Required

Responses

The specified version object.

application/json

allOf [object, Version]

object

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.

Version

A version as defined in a repository's issue tracker.

GET/repositories/{workspace}/{repo_slug}/versions/{version_id}
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'
200Response
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: