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

How to get all repository in all projects in bitbucket using bitbucket server API?

AzeemUllah April 1, 2020

What i want to do is calculate mean time to approval. 
Simply put; how much time it takes for one PR to get approved since it was opened. 

Lets say I have 50 projects and in each project has 5 repo. What i am doing right now is:

  1. Get list of all projects (1 API call)
  2. Get list of all repo in each project (recursive: 50*5 = 250 API calls)
  3. Get pull request history for each repo and in each project (recursive: 250)

As you can see there is alot of API calls being made and this will increase my a multiple ratio as repos and projects increases. 

My question is:

  1. Is there a way of getting like whole bitbucket pull request history?
  2. Is there a way of getting all the repo in all over projects with one call? 
  3. Is there a better way of achieving what i want in some other way?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events