You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Using the GUI, I can get a list of 354 files in the account with the string "APIM", but what I'm looking for is a list of repos with that string. This would seem like an obvious use case. I would rather not download all repos in the account onto my laptop simply to be able to ask this question.
Hi @David Harvey,
Code search indeed returns a list of files with your search term.
You could use our API to get a list of repos e.g. with a call like the following:
curl --user <BitbucketUsername>:<app-password> --request GET 'https://api.bitbucket.org/2.0/workspaces/<workspace-id>/search/code?search_query=APIM&fields=values.file.commit.repository.links.html.href'
This query though will return the repo URL for each file where the search term exists. If there are two files in the same repo with this search term, you will get the repo URL twice in the output.
If you want, I can create a feature request in our issue tracker for the ability to view the list of repos that contain a search term (along with the list files). Please feel free to let me know if you'd like me to proceed with that.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.