Use cURL
The examples within this document use cURL to demonstrate how to access the Oracle Managed File Transfer Cloud Service REST API.
To use cURL to access the Oracle Managed File Transfer Cloud Service REST API:
-
Install cURL, as described in Quick Start.
-
In a command window, set the cURL environment variable,
CURL_CA_BUNDLE, to the location of your local CA certificate bundle. For information about CA certificate verification using cURL, see: http://curl.haxx.se/docs/sslcerts.html. -
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. -HUse to define the content type of the request document. -iDisplays response header information. -u, --user username:passwordSpecifies the user name and password for the Oracle Managed File Transfer account. -XIndicates the type of request (for example, GET, POST, and so on).
For example, the following example cURL command discovers an MFT source named src1:
curl -u jsmith:welcome1
-H "Content-Type:application/json"
-H "Accept:application/json"
-H "X-ID-TENANT-NAME:ExampleIdentityDomain"
-X GET https://jaas.oraclecloud.com/paas/service/mftapp/rest/v1/sources?searchFilter=src1
Note:
This example uses the URL prefix for the United States (jaas). For information about the URL prefixes for other regions of the world, see Send Requests.