Hello,
We would like to analyze the repository using your API, our goal is to list all the folders and files in the repository limited by the folder depth of 4.
From what I have read it seems that this API
/2.0/repositories/{username}/{repo_slug}/src/{node}/{path}
Can give me the sources but it doesn't have a recursion option so I need to fetch each folder in a different request and to analyze , it is there a different API that I can use?
If there is no other API, is there an option to request for several sources at the same time? So we will be able to reduce the amount of requests.
Thank you.
Hi @The Sailor,
you were searching at the right place. The endpoint you mentioned supports recursion if you specify additionally the max_depth parameter and indicate how many levels you want to have.
You can then page through the results as described in the docs. Maybe this response is too late for you, but I hope it at least helps someone else.
Cheers,
Matthias.
Hello Mathias,
The link you shared is not clear on how to use the parameter. Is this to be passed as query string?
Also, what would be the value of node?
Thanks,
Altaf B.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.