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:

Addon

The addon resource is intended to use used by Bitbucket Cloud Connect Apps, and only supports JWT authentication.

Update an installed app

PUT /2.0/addon

Updates the application installation for the user.

This endpoint is intended to be used by Bitbucket Connect apps and only supports JWT authentication -- that is how Bitbucket identifies the particular installation of the app. Developers with applications registered in the "Develop Apps" section of Bitbucket need not use this endpoint as updates for those applications can be sent out via the UI of that section.

Passing an empty body will update the installation using the existing descriptor URL.

1
2
$ curl -X PUT https://api.bitbucket.org/2.0/addon \
  -H "Authorization: JWT <JWT Token>" \
  --header "Content-Type: application/json" \
  --data '{}'

The new descriptor for the installation can be also provided in the body directly.

1
2
$ curl -X PUT https://api.bitbucket.org/2.0/addon \
  -H "Authorization: JWT <JWT Token>" \
  --header "Content-Type: application/json" \
  --data '{"descriptor": $NEW_DESCRIPTOR}'

In both these modes the URL of the descriptor cannot be changed. To change the descriptor location and upgrade an installation the request must be made exclusively with a descriptor_url.

1
2
$ curl -X PUT https://api.bitbucket.org/2.0/addon \
 -H "Authorization: JWT <JWT Token>" \
 --header "Content-Type: application/json" \
 --data '{"descriptor_url": $NEW_URL}'

The descriptor_url must exactly match the marketplace registration that Atlassian has for the application. Contact your Atlassian developer advocate to update this registration. Once the registration has been updated you may call this resource for each installation.

Note that the scopes of the application cannot be increased in the new descriptor nor reduced to none.

Request

There are no parameters for this request.

Example

1
2
3
curl --request PUT \
  --url 'https://api.bitbucket.org/2.0/addon' \
  --header 'Authorization: Bearer <access_token>'

Responses

Request has succeeded. The installation has been updated to the new descriptor.

Delete an app

DELETE /2.0/addon

Deletes the application for the user.

This endpoint is intended to be used by Bitbucket Connect apps and only supports JWT authentication -- that is how Bitbucket identifies the particular installation of the app. Developers with applications registered in the "Develop Apps" section of Bitbucket Marketplace need not use this endpoint as updates for those applications can be sent out via the UI of that section.

1
2
$ curl -X DELETE https://api.bitbucket.org/2.0/addon \
  -H "Authorization: JWT <JWT Token>"

Request

There are no parameters for this request.

Example

1
2
3
curl --request DELETE \
  --url 'https://api.bitbucket.org/2.0/addon' \
  --header 'Authorization: Bearer <access_token>'

Responses

Request has succeeded. The application has been deleted for the user.

List linkers for an app

GET /2.0/addon/linkers

Gets a list of all linkers for the authenticated application.

Request

There are no parameters for this request.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/addon/linkers' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successful.

A schema has not been defined for this response code.

Get a linker for an app

GET /2.0/addon/linkers/{linker_key}

Gets a linker specified by linker_key for the authenticated application.

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successful.

A schema has not been defined for this response code.

List linker values for a linker

GET /2.0/addon/linkers/{linker_key}/values

Gets a list of all linker values for the specified linker of the authenticated application.

A linker value lets applications supply values to modify its regular expression.

The base regular expression must use a Bitbucket-specific match group (?K) which will be translated to ([\w\-]+). A value must match this pattern.

Read more about linker values

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}/values' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successful.

A schema has not been defined for this response code.

Update a linker value

PUT /2.0/addon/linkers/{linker_key}/values

Bulk update linker values for the specified linker of the authenticated application.

A linker value lets applications supply values to modify its regular expression.

The base regular expression must use a Bitbucket-specific match group (?K) which will be translated to ([\w\-]+). A value must match this pattern.

Read more about linker values

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

Example

1
2
3
curl --request PUT \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}/values' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successfully updated the linker values.

Create a linker value

POST /2.0/addon/linkers/{linker_key}/values

Creates a linker value for the specified linker of authenticated application.

A linker value lets applications supply values to modify its regular expression.

The base regular expression must use a Bitbucket-specific match group (?K) which will be translated to ([\w\-]+). A value must match this pattern.

Read more about linker values

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

Example

1
2
3
curl --request POST \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}/values' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successfully created the linker value.

A schema has not been defined for this response code.

Delete all linker values

DELETE /2.0/addon/linkers/{linker_key}/values

Delete all linker values for the specified linker of the authenticated application.

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

Example

1
2
3
curl --request DELETE \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}/values' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successfully deleted the linker values.

Get a linker value

GET /2.0/addon/linkers/{linker_key}/values/{value_id}

Get a single linker value of the authenticated application.

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

value_id Required

integer

The numeric ID of the linker value.

Example

1
2
3
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}/values/{value_id}' \
  --header 'Authorization: Bearer <access_token>'

Responses

Successful.

A schema has not been defined for this response code.

Delete a linker value

DELETE /2.0/addon/linkers/{linker_key}/values/{value_id}

Delete a single linker value of the authenticated application.

Request

Path parameters
linker_key Required

string

The unique key of a linker module as defined in an application descriptor.

value_id Required

integer

The numeric ID of the linker value.

Example

1
2
3
curl --request DELETE \
  --url 'https://api.bitbucket.org/2.0/addon/linkers/{linker_key}/values/{value_id}' \
  --header 'Authorization: Bearer <access_token>'

Responses