So I know how to get a list of the current running jobs from Jenkins: From Jenkins, how do I get a list of the currently running jobs in JSON?
Is there a way to get a list of all the jobs which have ran on Jenkins within the last 24 hours?
I don't know of a way to get Jenkins to perform the date filtering for you. So this approach is similar to a previous answer of mine.
You can get a list of all jobs and builds with a query like: http://jenkins:8080/api/json?tree=jobs[name,builds[fullDisplayName,id,number,timestamp]]&pretty=true
Then use the id
or timestamp
field to filter for builds generated after your target date.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With