Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-10601

API can't list files in branches with a / in the name

    XMLWordPrintable

Details

    Description

      We're using the API endpoint to list files in a repo at a specific branch:

      https://bitbucket.org/!api/1.0/repositories/

      {owner}

      /

      {reponame}

      /directory/

      {branch}

      Recently it started acting weird when a branch name containing forward slashes is passed to it. We tried both passing the branch name as is (that returns a 404) or with the branch name url-encoded (that gives us an odd 401):

      GET https://bitbucket.org/!api/1.0/repositories/jbpros/cucumber-pro-test/directory/master => 200
      GET https://bitbucket.org/!api/1.0/repositories/jbpros/cucumber-pro-test/directory/path-like%2Fbranch%2Fname => 401
      GET https://bitbucket.org/!api/1.0/repositories/jbpros/cucumber-pro-test/directory/path-like/branch/name => 404

      Is there something we're missing or is there something broken on your end?

      Attachments

        Activity

          People

            Unassigned Unassigned
            b2c31c3ff5d1 aslakhellesoy
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: