Use cURL
cURL is an open source, command-line tool for transferring data with URL syntax, supporting various protocols including HTTP and HTTPS.
The examples throughout the documentation use cURL to demonstrate how to access the Oracle Data Hub Cloud Service REST API..
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 |
---|---|
|
Specifies the request body, or data, either directly or by referring to a file on the local machine. Typically we identify the request document, in JSON format, on the local machine. |
|
Specifies the request body as a collection of form parameters. Define each parameter with a name and value, either directly or by referring to a file on the local machine. Typically we identify form data, in JSON format, on the local machine. |
|
Defines a request header. Typically we define one or both of the following:
|
|
Displays response header information. |
|
Specifies the user name and password for HTTP authentication. |
|
Indicates the type of request (for example, GET, POST, and so on). |
|
Connect to Oracle Cloud through a proxy server. Alternatively, set the |
For example:
curl -i -X GET -u myuser:mypass \ -H "X-ID-TENANT-NAME:ExampleIdentifyDomain" \ -H "Accept: application/json" \ "https://<subdomain>.<domain>.com:<port>/<resource-path>"