Use cURL
cURL is an open source, command-line tool for transferring data with URL syntax, supporting various protocols including HTTP and HTTPS.
To use cURL to access the REST API:
-
Install cURL, as described in Quick Start.
-
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.jsonIdentifies the request document, in JSON format, on the local machine. -F, --form @file.jsonIdentifies form data, in JSON format, on the local machine. -HDefines the Content type of the request document. -iDisplays response header information. -u, --user username:passwordSpecifies the user name and password for the <ProductName> account. -XIndicates the type of request (for example, GET, POST, and so on). -kBy default, every SSL connection curl makes is verified to be secure. This option allows cURL to proceed and operate even for server connections otherwise considered insecure. -capathIndicates to cURL to use the specified certificate directory to verify the peer.
The sample files can help in creating an application that requires managing the Oracle Database Appliance using Java as a language. The sample files use DCSAgentClient API class to manage database related life cycle operations such as listDatabases, createDatabase, updateDatabase, ObjectStoreSwift operations and many more. The following are representative samples of the REST APIs.
The following is an example syntax for cURL command:
curl -i -X GET -u <username>:<password> -H <request-header>:<value> https://<subdomain>.<domain>.com/<path>/<resource-path>