Rest-API gives invalid xml response

cancel
Showing results for 
Search instead for 
Did you mean: 

Rest-API gives invalid xml response

L1 Bithead

When receiving an error from the Panorama REST API, the platform is responding with what appears to be an invalid XML document. Here is the data in question:

<response><code>16</code><message>Invalid Credential</message><details><entry @type="CauseInfo"><causes><entry><code>2</code><module>panui_auth</module><description>Invalid Credential</description></entry></causes></entry></details></response>

All XML parsers/validators refuse this XML document as being not well formed. Removing the @ character appears to fix the problem.

 

Full URL Get: https://usdeast01pano.hersheys.com/restapi/v9.1/Objects/Addresses?location=shared&output-format=xml

 

Parameters (Key | Value) -- Already embedded in the get above: location | shared output-format | xml

 

Non-Standard Headers (Key | Value): X-PAN-KEY | <Invalid API Key>

 

Response: <response><code>16</code><message>Invalid Credential</message><details><entry @type="CauseInfo"><causes><entry><code>2</code><module>panui_auth</module><description>Invalid Credential</description></entry></causes></entry></details></response>

Mohammed T. Rahman
2 REPLIES 2

L4 Transporter

Hi @morahman

I can confirm I can see the same behaviour. I have raised a ticket with engineering to investigate further. Thanks for bringing this to our attention!

Help the community: "Like" helpful comments, and click "Accept as Solution" if you found your answer 🙂

Thanks @JimmyHolland 
Please kindly post in this discussion, if there is a fix in the future.

Mohammed T. Rahman
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!