Copy from SFTP
Copies a file or a backup snapshot from the SFTP Server (the source) to the cloud environment (the target).
If you are copying a backup snapshot, his API copies it from the SFTP Server and extracts its contents in Oracle Fusion Cloud EPM.
This API is version v2.
Note:
This API supports SFTP server running on port 22 only.
Note:
If IP allowlist is enabled for the SFTP server, you must add the outbound IP address of the OCI region that hosts the Oracle Fusion Cloud Enterprise Performance Management environments to the IP allowlist of the SFTP server. See Outbound IP Addresses of Cloud EPM Regions for the outbound IP addresses of OCI regions.
Required Roles
Service Administrator
REST Resource
POST /interop/rest/v2/config/services/copyfromsftp
Note:
Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for Cloud EPM REST APIs. Using this REST API requires prerequisites. See Prerequisites.
Request
Supported Media Types: application/json
The following table summarizes the POST request parameters.
Table 9-87 Parameters
Name | Description | Type | Required | Default |
---|---|---|---|---|
userName |
ID of a user who has the required access rights to read from the SFTP server | Payload | Yes | None |
password |
Password associated with the user | Payload | Yes | None |
url |
URL for the source file in SFTP server in the following format:
|
Payload | Yes | None |
filePath |
Name of the target filename (with path) of the downloaded artifact. When copying snapshots, do not specify the ZIP extension. Examples:
|
Payload | Yes | None |
Example of Request Body
{
"userName" : "username",
"password" : "password",
"url" : "sftp://mysever/mydir/File_new.txt",
"filePath" : "inbox/File_new.txt"
}
Response
Supported Media Types: application/json
Table 9-88 Parameters
Name | Description |
---|---|
details |
In the case of errors, details are published with the error string |
status |
See Migration Status Codes |
links |
Detailed information about the link and HTTP call type |
href |
Links to API call or status API |
action |
The HTTP call type |
rel |
Possible values: self or Job Status. If the value is set to Job Status, you can use the href to get the status of the job |
data |
Parameters as key value pairs passed in the request |
Example of Response Body
{
"details": null,
"status": -1,
"items": null,
"links": [
{
"href" : "https://<BASE-URL>/interop/rest/v2/config/services/copyfromsftp",
"action": "POST",
"rel" : "self",
"data" : null
},
{
"href" : "https://<BASE-URL>/interop/rest/v2/config/services/copyfromsftp/1716274994528",
"action": "GET",
"rel" : "Job Status",
"data" : null
}
]
}
Sample cURL command
curl -X POST -s -u '<USERNAME>:<PASSWORD>' -o response.txt -D respHeader.txt -H 'Content-Type: application/json' \
-d '{"url":"SFTP_URL ","userName":"USER_NAME","password":"PASSWORD","filePath":"FILEPATH/FILENAME"}' \
'https://<BASE URL>/interop/rest/v2/config/services/copyfromsftp'