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

How to fetch the count of Successful and Failed builds over a period of time from bitbucket pipeline

Kishore August 21, 2024

 

I'm trying to fetch the count of Successful and Failed builds over a period of time from bitbucket pipeline (eg: 1-Jan to 1-Mar). 

I used Bitbucket REST API to achieve the same. https://api.bitbucket.org/2.0/repositories/{REPO_OWNER}/{REPO_SLUG}/pipelines/

But apparently, I have more than 100 builds, I'm facing issue with the 'pagelen' since the maximum supported length is '100'. 

Is there any way to achieve this?

1 answer

1 vote
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 22, 2024

G'day, @Kishore 

Welcome to the community!

To ensure the stability of our platform, we only allow 100 objects per page. However, as our document mentions Pagination , we will return the next page's URL that you can utilize to navigate to the next 100 objects page.

Regards,
Syahrul

Kishore August 30, 2024

Hi @Syahrul , I observed the same mentioned in the API documentation. But I can't see the next page's URL in my API response. 

Is it an optional field that it won't be provided for all API response? 

I appreciate your response, thanks

Regards,
Kishore

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 1, 2024

Hi @Kishore 

Thanks for the update. It looks like I missed it, there's a bug with the next page for pipeline endpoints:

https://jira.atlassian.com/browse/BCLOUD-13806

You can try the workaround suggested in the bug report to navigate to the next page.

Regards,
Syahrul

Kishore September 1, 2024

Hi @Syahrul 

I'm not sure whether the workaround will satisfy my requirement since as per workaround I have to loop through multiple pages and collect the data to process. 

But I'll give it a try. 

Thanks,
Kishore

Like Syahrul likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events