When using the folders plugin on Jenkins, jobs are ordered in a tree. I need to retrieve all jobs using the tree query remote api, without know the trees depth.
Eg
api/json?tree=jobs[name,jobs[name,jobs[name]]]&pretty=true
will return all job names from the root of the tree, and the two next levels. Ideally I would like a query that just gives me all job names.
Is this possible? The tree query api is pretty much undocumented... (I experimented with * but that just returns all properties)
I have meanwhile asked this to Cloudbees themselves. You either ask all info with the depth parameter, or you manually concatenate the parameters. Either way you need to know the depth.
api/json?depth=3&pretty
or
api/json?tree=jobs[name,buildable,jobs[name,buildable,jobs[name,buildable]]]&pretty
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