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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get a list of files in a given repo with the rest api? Edited

Hi, I have a project with 20 repos. I would like to get a list of file names for each repo (in the main branch -some are called 'master', some 'main'-).

How do I go about doing this?

I saw this answer in another question, but it didn't really work for me. This is specifically what I tried (to get all the files in one repo's master branch):

/rest/api/1.0/projects/{projectName}/repos/{repoName}/master/files?limit=1000

Where am I going wrong? Ideally I would like to get all files under all repos inside a given project in one call, but if that's not possible I can settle for making an API call per repo to get each of their list of files. I don't need the content, just the file names.

 

Thanks!

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

117 views 0 2
Join discussion

Community Events

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

Events near you