node-jenkins-api icon indicating copy to clipboard operation
node-jenkins-api copied to clipboard

how to return the build's actions info when use all_builds api?

Open Alan-W opened this issue 8 years ago • 3 comments

jenkins.all_builds(job, 'id,timestamp,result,actions', {depth: 1}, function(err, data) { if (err){ throw err; } });

add the 'actions' param, but just return an Incomplete data in actions array, every item only has '_class' property and no 'parameters' property

Alan-W avatar Sep 25 '17 07:09 Alan-W

Hey, what do you get when you do the following request on your jenkins host (replace localhost:8080 with your URL of your Jenkins server)? http://localhost:8080/job/asrwqersfdzdraser-test/api/json?tree=allBuilds[id,timestamp,result,actions]&depth=1

It might be the case, that Jenkins isn't actually sending more information through this API. At least I'm not getting more than what you describe.

kub1x avatar Sep 25 '17 13:09 kub1x

Is not reproducing for me with the same action

ddimitrioglo avatar Nov 13 '17 12:11 ddimitrioglo

Bit late now, but for anyone else who gets stuck on this you can request sub-properties by using square brackets like so:

All action subproperties: 'id,timestamp,result,actions[*]'

A specific action subproperty: 'id,timestamp,result,actions[buildsByBranchName]'

miracle7 avatar Feb 24 '18 05:02 miracle7