The Legacy REST Web Services server can return output data in either JavaScript Object Notation (JSON) or eXtensible Markup Language (XML) format. It will enclose all returned data in a JSON object with the name atgResponse or an atgResponse XML element.

The following example shows JSON output markup.

{"atgResponse": "280001"}

The following example shows XML output markup.

Default Output Markup

Configure your Legacy REST Web Server to return output data in the format you choose. The default output format of the server is controlled by its /atg/rest/Configuration/

The server will return data in its default output format if you do not specify the output format for an individual request. See Specifying Output Markup for One Request.

Specifying Output Markup for One Request

You can choose either JSON or XML for the returned data of a single Legacy REST Web Services request. The output format you specify for an individual request will override the default output markup setting.

To specify the output format for an individual Legacy REST Web Services request, include the atg-rest-output control parameter with that request. Set the value of atg-rest-output to either json or xml. See Adding Control Parameters.

The following example shows a Legacy REST Web Services request that includes the atg-rest-output control parameter. The control parameter specifies that data should be returned using XML markup.

curl -v -b cookies.txt -X GET \

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices