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,296,479
Community Members
 
Community Events
165
Community Groups

API to pull the list of pipelines ran between timestamps

I need to build a report and need the list of pipelines ran between two dates timestamp in the entire workspace with their current status.
I found the below API to get the pipelines, but it only returns the data for one repo at a time. This API also has a limitation of thousand calls per hour, and I have more than a thousand repositories in my workspace-
https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/


Please suggest how I can solve this.

 

Thanks,

Dev

1 answer

0 votes
Mark C Atlassian Team Sep 28, 2021

Hi @Devendra Sharma

Thanks for reaching out to the community.

Indeed, you can use that Pipelines Bitbucket Cloud REST API endpoint to get your Pipelines builds.
However, I'm afraid it will only get Pipelines builds one repository at a time.
You'll have to make multiple requests to get Pipelines builds from multiple repositories.

That is also true that we have the API rate limits for the API endpoints from /2.0/repositories.
For this, we normally suggest doing the following to avoid getting rate limited:

  • Putting a delay/sleep 5-10 min for the API calls made against your account to the repositories to avoid reaching throttling limit (Also please note that the hour is rolling hour not "fixed clock hour")
  • Set up multiple users and make API calls from multiple authenticated users to the list of specific repositories to avoid hitting that limit.

You mentioned that you need to build a report to list Pipelines builds.
May I know if you wanted to get Pipelines build minutes usage across your repositories?

Regards,
Mark C

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,179 views 2 9
Read article

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