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

Default branch REST API 404

    XMLWordPrintable

Details

    • 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.

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: