Skip to main content
Solved

GETStorage Pool PowerShell RestApi

  • September 25, 2021
  • 6 replies
  • 144 views

Forum|alt.badge.img+6

 

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

 

 

Best answer by MaxJamakovic

Yes I found workaround

Thanks Mike

 

View original
Did this answer your question?

6 replies

Forum|alt.badge.img+15

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


Forum|alt.badge.img+6
  • Author
  • Byte
  • 27 replies
  • September 29, 2021

@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 

 


Mike Struening
Vaulter
Forum|alt.badge.img+23

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


Forum|alt.badge.img+6
  • Author
  • Byte
  • 27 replies
  • Answer
  • November 15, 2021

Yes I found workaround

Thanks Mike

 


Mike Struening
Vaulter
Forum|alt.badge.img+23

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

Thanks!!


Mike Struening
Vaulter
Forum|alt.badge.img+23

@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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings