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

Rate this page:

Issue tracker

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.

List components

GET /2.0/repositories/{workspace}/{repo_slug}/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 Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Example

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'

Responses

The components that have been defined in the issue tracker.

Content typeValue
application/json

Paginated Components

Get a component for issues

GET /2.0/repositories/{workspace}/{repo_slug}/components/{component_id}

Returns the specified issue tracker component object.

issue

Request

Path parameters
component_id Required

integer

The component's id

repo_slug Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Example

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'

Responses

The specified component object.

Content typeValue
application/json

allOf [object, Component]

List issues

GET /2.0/repositories/{workspace}/{repo_slug}/issues

Returns the issues in the issue tracker.

issue

Request

Path parameters
repo_slug Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Example

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'

Responses

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

Content typeValue
application/json

Paginated Issues

Create an issue

POST /2.0/repositories/{workspace}/{repo_slug}/issues

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 Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Body parameters
Content typeValue
application/json

allOf [object, Issue]

Example

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
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": "new",
  "kind": "bug",
  "priority": "trivial",
  "milestone": {
    "type": "<string>"
  },
  "version": {
    "type": "<string>"
  },
  "component": {
    "type": "<string>"
  },
  "votes": 2154,
  "content": {
    "raw": "<string>",
    "markup": "markdown",
    "html": "<string>"
  }
}'

Responses

The newly created issue.

Content typeValue
application/json

allOf [object, Issue]

Header Parameters
Location

string

The (absolute) URL of the newly created issue.

Export issues

POST /2.0/repositories/{workspace}/{repo_slug}/issues/export

A POST request to this endpoint initiates a new background celery task that archives the repo's issues.

For example, you can run:

curl -u -X POST http://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/ issues/export

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 Required

string

This can either be the repository slug or the UUID of the repository, surrounded by curly-braces, for example: {repository UUID}.

workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

Body parameters

Options for issue export.

type Required

string

project_key

string

project_name

string

send_email

boolean

include_attachments

boolean

Additional Properties

anything

Extra properties of any type may be provided to this object.

Example

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
}'

Responses

The export job has been accepted

A schema has not been defined for this response code.

Check issue export status