Use the format / api / xml:
https://jenkinsurl/job/folder_level1/api/xml
which returns an action XML node that can be requested through XPath:
Take the appropriate name from there to search for data:
- builtOn - the machine on which the assembly is deployed to
- number - version number of the deployed package
Using XPath for each along with a node wrapper for grouping, for example, for builtOn:
https://jenkinsurl/job/folder_level1/api/xml?depth=3&xpath=//fullDisplayName[contains(text(),'foo')]/following-sibling::builtOn&wrapper=builtOn_results
and the other for the version:
https://jenkinsurl/job/folder_level1/api/xml?depth=3&xpath=//fullDisplayName[contains(text(),'foo')]/following-sibling::number&wrapper=version_results
References
source share