hi db,

I tried with xml api  below is my url

https://jenkins.myrepo.com/job/architecture-shared-services/job/loanrules_sit/api/xml?tree=builds[number,url,result,actions[parameters[name,value]]]&pretty=true&xpath=//parameter[name=%27rulesetid%27%20and%20value=%27635aa36a3f80310ae7e36c87%27]&wrapper=builds

It returns 

<builds>
<parameter _class="hudson.model.TextParameterValue">
<name>rulesetid</name>
<value>635aa36a3f80310ae7e36c87</value>
</parameter>
</builds>

How do I get number, url, result tags in the response?


On Thursday, 27 October 2022 at 20:36:01 UTC+5:30 db...@cloudbees.com wrote:

> On Thu, Oct 27, 2022 at 3:39 PM Chennai Cheetah <chennai...@gmail.com> 
> wrote:
>
>> How do I get only selected jenkins information from the API response.
>>
> …
>>
> How do I filter rulesetid,branch details only from the parameter object, 
>> while rest of the parameters are not required in the response.
>>
> Work with the XML API output and use an XPath expression, or process the 
> JSON API responses using a tool like jq.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/36146459-3b3f-4063-866f-1b008c97b9b1n%40googlegroups.com.

Reply via email to