Skip to main content

 

for me application json works ok but xml is returning, I’m using example from api.commvault

],
       
            "System.Xml.XmlWhitespace",
            "System.Xml.XmlElement",
            "System.Xml.XmlWhitespace",
            "System.Xml.XmlElement",
            "System.Xml.XmlWhitespace"

https://api.commvault.com/#89226552-b05f-423f-b951-79d8592a390b

 

 

Hi @MaxJamakovic 

Thank you for raising the question, the converted json is not working, but are you able to check the xml output before piping through the ConvertTo-Json?

I’m curious to understand if the xml itself in $response is properly formed.

 

Also, another question, if you are happy with the application/json output, what is the purpose for outputting to xml then converting to json?

Thanks,

Stuart


@Stuart Painter if I remove | ConverTo-Jason 

I’m curious to understand if the xml itself in $response is properly formed

the output is 

Api_GetStoragePoolListResp
--------------------------
Api_GetStoragePoolListResp

 

I’m using the example from api.commvaut.com exact same command 

 


@MaxJamakovic , following up on this thread.  Did you get an answer to your issue?  If not, I can tag in some other people.


Yes I found workaround

Thanks Mike

 


Glad to hear it!  Would you mind sharing it with the community for posterity?

Thanks!!


@MaxJamakovic , I’m marking your reply as the solution, though I’

d love for you to reply back with your workaround when you get a chance as well :nerd:


Reply