Aruna Karunarathna
Aruna Karunarathna

Reputation: 1021

Jenkins Rest API get the commits of a particular build

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.

Upvotes: 6

Views: 5082

Answers (2)

Amol Manthalkar
Amol Manthalkar

Reputation: 2088

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[*[*]]

Upvotes: 1

anand
anand

Reputation: 643

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

Upvotes: 6

Related Questions