Using the API and running this query for example...
returns only myfile.json if it exists in the Master branch of the "myrepo" repo. I can't find any information on how to search within another branch.
How can I alter this search to search either a specific branch or the entire repo?
@StuMid the code search API only indexes the main branch so you're correct that you can only use this API with that branch to search file contents.
That said, you can use the src API to fetch files from any branch given that you know the filename.
You can use a branch name where it says "commit" but there is an annoying limitation that the branch name cannot contain a slash. If the branch name contains a slash you'd have to take a 2 step approach and first look up the commit of the branch using the branch API.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events