1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues


Issue #4082 wontfix

main_branch json key disappeared

Will Bond
created an issue

I'm hitting the 1.0 API URLs like I have been for the past six months, but all of a sudden the main_branch key in the repository json object disappeared.

For example https://api.bitbucket.org/1.0/repositories/tortoisehg/thg/branches/ has 3. Now you could guess that "default" is the default, but not all projects follow that, such as https://api.bitbucket.org/1.0/repositories/wbond/flourish/branches/.

Any chance you can restore that key to 1.0 and delete it from version 1.1 of the API?

Comments (2)

  1. Brodie Rao

    We intentionally removed this from the repository API because it was causing serious performance problems when we served up responses containing many repos (like the list of a user's repos, for example). It's not ideal, and we don't like changing the API, but we went ahead and did it mainly because we never officially documented main_branch as being part of the API.

    You can now get at this information via a separate endpoint: https://api.bitbucket.org/1.0/repositories/tortoisehg/thg/main-branch/. Our API docs should make mention of it in the near future.

  2. Log in to comment