2

I want to get list of free_style jobs from remote Jenkins.
eg. http://localhost:8080/api/xml?tree=jobs[name,url,description] by this i am able to get all jobs but i want to filter only freestyle project.

user1349964
  • 137
  • 5

1 Answers1

0

Add a XPath filter for the _class attribute value, and wrap the results with a tag, e.g. root:

http://localhost:8080/api/xml?tree=jobs[name,url,description]&xpath=hudson/job[@_class="hudson.model.FreeStyleProject"]&wrapper=root

t0r0X
  • 4,212
  • 1
  • 38
  • 34