currently, we are using the bitbuckets new branching model.
we currently have around 30 feature repositories and its kind of a pain to set the same configuration manually on all those 30 repositories.
i wanted to know if there is an API endpoint where I can do a POST or PUT to all the repositories and have the same configuration on all them.
FYI, We are using BitBucket Cloud
Reviewing the endpoint used by Bitbucket Cloud in Branching Model (you can hit the following on your web browser - https://bitbucket.org/!api/internal/repositories/USERNAME/REPOITORY_SLUG/branching-model/settings - replacing USERNAME and REPOSITORY_SLUG) we can notice an internal API is being used.
At the same time, reviewing public API available to Bitbucket Server, there is only a GET on branchmodel (https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-branch-rest.html). For this reason, it seems there is no POST or PUT method available using API v2.
Perhaps you could visit https://bitbucket.org/USERNAME/REPOSITORY_SLUG/admin/branching-model and get the PUT http request that is being issued when saving the branching model configuration.
Hello Rafeal,
Thanks for the response to my query.
i tried internal API's which you mentioned and I get a 401 unauthorized error.
I am using the basic authentication to call the internal API's.I am actually the admin for the account but still, I get a 401.
do u know if I have to use some other authentication type?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.