I have just finally figured out how to receive json output from the REST API and I'm bewildered.
The Accepts header that you're meant to pass seems to differ depending on which part of the REST API you're invoking. For example, the two commands below both work:
curl -H Accept:application/vnd.ca.lisaInvoke.vseList+json -u USERNAME:PASSWORD "http://LISAHOST/api/Dcm/VSEs"
curl -H Accept:application/vnd.ca.lisainvoke.VirtualService+json -u USERNAME:PASSWORD "http://LISAHOST/api/Dcm/VSEs/VSE4/serviceName"
Highlighting the the bits in bold - the Accept header is different in each case. Funnily enough, that's what the root element in the response is called, vseList and VirtualService respectively (that's how I figured it out).
Why on earth is the server not just accepting "application/json"? Why is it different in each case?
depends on how the author code the web server side of the transaction.. they coded to specific accept headers..