Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tree API for Bitbucket Server

Sarath Kumar Harikrishnan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2019

Hi Team,

I'm working on trying to fetch {files and directories} on a particular path recursively using Bitbucket server REST API. I could able to retrieve only files and directories at root level. I'm looking for something that provides result recursively [traversing the sub directories from the path provided].

 

Looking for something similar to Git Trees API below,

GET /repos/:owner/:repo/git/trees/:tree_sha?recursive=1

 

Tried below Bitbucket server APIs for my requirement,

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/raw/{path:.*}

/rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}/browse/{path:.*}

 

From the forums i could see there's an internal api available for this ask, but it didn't work for me [maybe i'm trying it wrongly though!].

Any help around this is much appreciated.

 

Is there any rate limiting option exists i.e we could make only 16 requests/min using API? Please correct me if i'm wrong with this one.

 

Thanks,

Sarath

 

1 answer

0 votes
abulka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 2, 2020

I'm also interested in a recursive repo tree listing, the way GitHub does it.

Sounds like we need to drill down ourselves, via the rest api, into any directories and also take into account possible pagination, which means even more drilling through?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events