Remote Jenkins API - is it possible to get a complete task tree using the Jenkins query api tree without knowing the depth?

When using the folder plugin on Jenkins, jobs are ordered in a tree. I need to get all jobs using the remote api request tree, without knowing the depth of the trees.

For instance,

api/json?tree=jobs[name,jobs[name,jobs[name]]]&pretty=true

will return all job names from the root of the tree and the next two levels. Ideally, I need a query that just gives me all the job names.

Is it possible? The query api tree is pretty undocumented ... (I experimented with *, but that just returns all the properties)

+4
source share
1 answer

Cloudbees. , . .

api/json?depth=3&pretty

api/json?tree=jobs[name,buildable,jobs[name,buildable,jobs[name,buildable]]]&pretty
+3

All Articles