Use cURL
cURL is an open source, command-line tool for transferring data with URL syntax. To connect securely to the server, you must install a version of cURL that supports SSL.
Invoke cURL and specify one or more of the command-line options defined in the following table, as required, to direct its execution.
cURL Option | Description |
---|---|
-d, --data @file.json |
Identifies the request document, in JSON format, on the local machine. |
-F, --form @file.json |
Identifies form data, in JSON format, on the local machine. Also passes parameters for creating or updating an application. |
-H |
Defines one or all of the following:
|
-i |
Displays response header information. |
-o path |
Identifies the response output on the local machine. Use this option to save the output to a file. |
-u, --user username:password |
Specifies the user name and password for the account as an alternative to the Authorization header. |
-X |
Indicates the type of request (for example, GET, POST, and so on). The default is GET. |
The following example shows how to view the details of an application by submitting a GET request on the REST resource using cURL:
curl -i -X GET -u joe@example.com:myPassword -H "X-ID-TENANT-NAME:ExampleIdentityDomain" \ https://apaas.us.oraclecloud.com/paas/service/apaas/api/v1.1/apps/ExampleIdentityDomain/ExampleAppId