Issue #4082 wontfix

main_branch json key disappeared

Will Bond avatarWill 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.