Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,886
Community Members
 
Community Events
176
Community Groups

Search to list repos with a certain string

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.

1 answer

0 votes

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

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events