Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-10313

Default branch REST API 404

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 5.6.0
    • None
    • We collect Bitbucket feedback from various sources, and we evaluate what we've collected when planning our product roadmap. To understand how this piece of feedback will be reviewed, see our Implementation of New Features Policy.

      Problem Definition

      REST API endpoint for the default branch returns a 404 for empty repositories when just created by Bitbucket:

      projects/pkey/repos/rslug/branches/default
      

      Suggested Solution

      When using the REST point:

      • for empty repos: return the equivalent of the "Not defined" value shown in the webpage (see attached screenshot).
      • for the repos with an invalid default, 404 is legitimate (current behavior)

      Workaround

      Use a try/catch block and post-process the list of 404 repos with /branches to separate the really empty from the misconfigured.

              bturner Bryan Turner (Inactive)
              bc2d6922a0ac R.S.
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: