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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.