Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket Cloud App - Determine current installations

Ryan Than October 24, 2021

Hello!

We are currently in the process of developing an external cloud app for Bitbucket but we ran into a snag. We have noticed that if the user uninstalls an app, the app is notified but if for some reason the app is not running, the uninstall succeeds, but the app doesn't know that. This can cause the app and Bitbucket to become out of sync.

We are essentially looking for a way to make sure that the app is able to sync up with Bitbucket. We are wondering if there is any way to get a list of installations for an app, possibly through an API call? We found this page that describes the licensing process for cloud apps and this page that describes the API calls but the response does not seem particularly helpful in this case.

Any help would be greatly appreciated!

1 answer

0 votes
seanaty
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 26, 2021

Bitbucket doesn't have an API to display the number of installations, unfortunately.

The best way to sync or check if a user has uninstalled (if you missed the callback) would to make a request to an endpoint that requires authentication. If you get a 401 back, this would mean that the application has been uninstalled. Be careful when developing this, however because you don't want to have a mistake in your authentication code and accidentally remove an installation.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events