I'm almost 100% sure the PI Web API only returns its output in JSON format but I want to double check if that's true or if it can also return data in XML format. Thanks for your feedback.
PI Web API responses are in JSON format only.
Though PI WEB API does not automatically return data in Xml format, if you interested in a custom application I would encourage you to check out: How to write PI Data to files in XML format?
Retrieving data ...