Would like to have a Rest API which return the CommitID using a file in a non-default Branch

XMLWordPrintable

      Problem Statement:

      I am trying to see if we have a Bitbucket REST API call which will provide commit ID information for a file in a branch

      I was able to use the below end point if the file exists in default master branch but unable to construct one for a file residing in a branch

      curl -k -X GET -u username:password https://bitbucket-server-instance/bitbucket/rest/api/1.0/projects/PROJ/repos/test-repo/commits/?path=test.yml
      

      But doesn't seem to work for a non-default branch.

      Suggested resolution:

      Have a API which can add the filename and it would provide the Commit ID of that file.

      /REST/API/1.0/PROJECTS/{PROJECTKEY}/REPOS/{REPOSITORYSLUG}/branch/COMMITS?File&path
      

            Assignee:
            Unassigned
            Reporter:
            Dilan Dresch (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: