You can use any means of transmitting HTTP requests to the ATG platform REST Web Services that you wish. Any client software that is capable of sending and receiving messages via HTTP will be adequate. Select the client software that you use according to the requirements of your environment.

ATG Clients for the REST Web Services

Oracle ATG Web Commerce provides two client libraries that you can use to interact with the Oracle ATG Web Commerce platform REST Web Services. These clients make the REST Web Services easier to use by hiding all the complexity of creating connections, assembling payloads for requests, and processing responses. See information about the clients in ATG Client Libraries.

Curl Command Line Tool in Documentation Examples

The examples in this document use the Curl command-line tool to send and receive HTTP messages. Curl is shown in these examples because its command-line invocation shows the input and the HTTP activity that takes place when using the Oracle ATG Web Commerce platform REST Web Services. See information about the Curl command-line tool at http://curl.haxx.se/.

Note: You can use any client software to exchange HTTP messages with the Oracle ATG Web Commerce platform REST Web Services. You are not required or encouraged to use the Curl command-line tool.

Note: Oracle ATG Web Commerce is not associated with the makers of the Curl command-line tool in any way. Find all information about the tool and its makers at http://curl.haxx.se/.

The examples in this document include several command-line flags. These flags configure the behavior of the Curl command-line tool as it makes HTTP requests. The flags are included in examples to better show the HTTP requirements of the Oracle ATG Web Commerce platform REST Web Services interface and to help you reproduce the examples if you choose to do so.

The following example shows a typical invocation of the Curl command-line tool. The components of the command are explained in the table below.

curl -v \
-b cookies.txt \
-X PUT \
-H "Content-Type: application/xml" \
-d "<parameters><middleName>Desire</middleName></parameters>" \
http://servername:port/rest/repository/atg/userprofiling/
ProfileAdapterRepository/user/300001

Command Component

Explanation

curl

Names the program being invoked. The manner in which you invoke the Curl command-line tool depends on the way it has been installed in your environment.

-v

Write verbose output while sending and receiving HTTP messages. This option exposes more details of the HTTP transaction.

-b

Use cookies stored in the specified file to authenticate the client. This example specifies that cookies are stored in a file named cookies.txt.

A session identifier must be stored in the file. When Curl logs into the REST Web Services, the -c cookies.txt instructs it to write the cookies it receives in that file. See Logging In.

-X

Use the specified HTTP method when communicating with the REST Web Services. This example specifies that Curl should use the PUT method.

-H

Include the specified Content-Type declaration in the HTTP request header. This describes the nature of the data in the message body of the HTTP request. See Setting the Content-Type Value.

-d

Include the following content in the message body of the HTTP request. This example includes XML parameters in the message body.

URL

The URL of the Oracle ATG Web Commerce platform REST Web Service that is used in the example. See REST Web Services URLs.

Note: The HTTP transactions shown in the examples in this document may include specific details of the testing environment used to produce them. Some details may differ in the HTTP transactions you conduct with the Oracle ATG Web Commerce platform REST Web Services. For example, the application server version identifiers shown in the HTTP transaction may not match the application that your Oracle ATG Web Commerce platform server uses.