AnsweredAssumed Answered

How to apply xpath query to REST results from Spectrum with PAM?

Question asked by ElioteArg on May 10, 2016
Latest reply on May 26, 2016 by ElioteArg

I'm trying to create a process within PAM in order to create users in Spectrum using REST, and to do so, I need to get the landscapes (the quantity and their model handles) to make a loop operator to create the users for each landscape. The problem I'm facing now is that I receive the http response from OneClick and if I try to apply an xpath query to get the lanscapes only (I'm testing with an xpath tester), it seems the response is not well formed. I suspect I'm doing something wrong.

 

This is the response:

 

<landscape-response xmlns="http://www.ca.com/spectrum/restful/schema/response" total-landscapes="2">

 

 

      <landscape>

 

 

     <id>0x100000</id>

 

     <name>ss1pr</name>

     <isPrimary>true</isPrimary>

     <spectrumVersion>9.4.3.000</spectrumVersion>

</landscape>

 

 

 

   <landscape>

 

 

    <id>0x200000</id>

 

    <name>ss2pr</name>

    <isPrimary>true</isPrimary>

    <spectrumVersion>9.4.3.000</spectrumVersion>

    </landscape>

 

</landscape-response>


 

From this response, I'd need to save in a value map array the landscape IDs and their names.

 

Any idea?

Outcomes