Hi , I am using docker image to host Bitbucket server in a EC2 instance, When I am calling `api/latest/projects/projectKey}/repos` its not returning default branch in response. Even though there is default branch , I also verified using the
/api/latest/projects/{projectKey}/repos/{repositorySlug}/default-branch, its returning the default branch.
Due to performance reasons , I can't call the second api for each repo. Please let me know why default branch is not coming in Get repos call.
Hi @deep_meena
Welcome to the Atlassian community.
The Get repositories for project endpoint doesn't actually return the default branch.
After discussing the code and documentation with the developers, we concluded that this is a bug and filed BSERV-19566 to correct the documentation.
We are truly grateful that you brought this to our attention and assisted us in making improvements to our system.
The only workaround, as stated in the BSERV-19566, is to retrieve the default branch using the Get repository default branch API. Because it's such a light API, Bitbucket performance won't be impacted if you use it serially for multiple repositories.
Regards,
Aman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.