How to retrieve all previous builds of Jenkins jobs through the API?

I am building a python script to extract historical data for the Jenkins job. I have successfully used the Requests library to retrieve the json output, enter the data frame and report it.

I noticed that it just pulled the last 100 versions, which looked like the default version. I was testing a basic curl call and it could retrieve the last 100 nicely, see how I retrieve all the builds. I I have been searching Google and found one that says to add fetch_all_builds = True, but it is still only 100.

Does anyone know how to request all builds from the job via an API call?

Thank you

adding tree = allBuild will provide you with the content you need.

/job//api/json?tree=allBuilds[*]&depth=2

This It is the API call URL.

I am building a python script to extract the construction history data for the Jenkins job. I have successfully used the Requests library to retrieve the json output, input the data frame and Report.

I noticed that it just pulled the last 100 versions, which looks like the default version. I am testing a basic curl call, which can retrieve the last 100 very well, See how I retrieve all builds. I have been searching Google and found one that says to add fetch_all_builds=True, but it is still only 100.

Does anyone know how to request all builds from the job via an API call?

Thank you

Adding tree = allBuild will provide you with the content you need.

/job//api/json?tree=allBuilds[*]&depth=2

This is the API call URL.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2743 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.