Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Rest API get the commits of a particular build

Tags:

rest

jenkins

I'm trying to get the commits list of a particular build in jenkins. However Jenkins Rest API documentation does not provide any comprehensive details about how to get this done.

Any help?.. suggestion?

Thanks.

like image 584
Aruna Karunarathna Avatar asked Feb 28 '14 04:02

Aruna Karunarathna


2 Answers

did you try this?

For changeSet, you can use http://jenkins/job/myjob/../api/json?tree=changeSet[*[*]] to retrieve everything. Use nested square braces for specific sub-subproperties, e.g. http://jenkins/job/myjob/../api/json?tree=changeSet[items[revision]]

reference : here

like image 102
anand Avatar answered Oct 06 '22 01:10

anand


changeSet keyword seems to be working fine with Perforce. But for git there is a minor change. It is changeSets. So for git it would be http://jenkins/job/myjob/../api/json?tree=changeSets[*[*]]

like image 24
Amol Manthalkar Avatar answered Oct 06 '22 02:10

Amol Manthalkar