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

Unable to filter branches using api.

    XMLWordPrintable

Details

    Description

      Hello.

      When I try to run this query:

      "/2.0/repositories/<ACCOUNT>/<PROJECT>/refs/branches?q=type%3D%22branch%22+and++name%3D%22branch1%22++OR++name%3D%22branch2%22+&format=json"
      

      I am getting this:

      string(146) "{"type": "error", "error": {"message": "unsupported operand type(s) for |: &#x27;function&#x27; and &#x27;Condition&#x27;", "id": "ac110aa5597940ee89b1030cda770a82"}}"
      

      It works fine for one branch:

      /2.0/repositories/<ACCOUNT>/<PROJECT>/refs/branches?q=type%3D%22branch%22+and++name%3D%22branch1%22+&format=json
      

      According to documentation I should be able to do it:
      https://developer.atlassian.com/bitbucket/api/2/reference/meta/filtering#query-ref

      Thank you and have a nice day.

      Attachments

        Activity

          People

            6995b9ed1710 evzijst
            9bd03499e4e1 Greg Drozd
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: