Developer
News and Updates
Get Support
Sign in
Get Support
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
Sign in
DOCUMENTATION
Cloud
Data Center
Resources
Sign in
  • Addon
  • Branch restrictions
  • Branching model
  • Commit statuses
  • Commits
  • Deployments
  • Downloads
  • GPG
  • Issue tracker
  • Pipelines
  • Projects
  • Pullrequests
  • Refs
  • Reports
  • Repositories
  • SSH
  • Snippets
  • Source
  • Users
  • Webhooks
  • Workspaces
  • Other operations
Cloud
Bitbucket Cloud / Reference / REST APIs

Addon

Postman Collection
OpenAPI

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

PUT

Update an installed app

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 3 4 $ 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 3 4 $ 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 3 4 $ 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

This request has no parameters.

Responses

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

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

Delete an app

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

This request has no parameters.

Responses

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

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

Get the client key of a Connect addon

Get the client key of the Connect addon associated with a Forge app install via forgeAppId linkage.

This endpoint is part of the Connect -> Forge migration tooling. It is intended to be used by a Forge app using asApp().requestBitbucket() only. Prerequisite: app developer needs to register the linkage between their Connect and Forge app by setting forgeAppId in the Connect addon descriptor to app.id from Forge app manifest, then update the installations. If the request came from an installation of a registered Forge app, the client key of the linked Connect addon installed in the same workspace will be returned.

1 api.asApp().requestBitbucket(route`/2.0/addon/{addon-key}/client-key`)
Scopes
admin:workspace:bitbucket

Request

Path parameters

addon_key

string

Required

Responses

The client key of the Connect addon linked to the Forge app installation where the request was made

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

Rate this page: