Question

GETStorage Pool PowerShell RestApi

  • 25 September 2021
  • 2 replies
  • 42 views

Badge +2

 

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

 

 


2 replies

Userlevel 6
Badge +14

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

Badge +2

@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 

 

Reply