Advanced FTP V2 Connector

Advanced FTP V2 Connector

sendfiles

sendfiles

Use the sendfiles resource to transfer files to a remote server.
The following connection types use the sendfiles resource to transfer files to the remote server:
  • AS2
  • Advanced FTP V2
  • Advanced FTPS V2
  • Advanced SFTP V2
Before you construct a sendfiles request to transfer files, obtain the identifier of the connection that provides access to the server. To get the connection ID, you can send a GET request using the connection resource. The connection resource can return information for each of your organization's connections.

POST Request

To transfer files, include the connection ID in the following URI.
mftsaas/api/v1/sendfiles/<connection ID>
Include the following information in the request:
Field
Type
Required
Description
targetConnectionType
String
Yes
Connection type.
The supported connection types are:
  • Advanced FTP V2
  • Advanced FTPS V2
  • Advanced SFTP V2
  • AS2
srcDirectoryPath
String
Yes
Directory path from where files are transferred.
tgtDirectoryPath
String
-
Directory path to where files are transferred.
This option is available only for Advanced FTP V2, Advanced FTPS V2, and Advanced SFTP V2 connection types.
Default is '/'.
srcFilePattern
String
Yes
Source file name pattern. Specify a file name pattern to identify which files to send. You can use the regular expression type.
deleteSourceFiles
String
-
Whether to delete source files after a successful POST request. Use one of the following values:
  • true. Delete source files.
  • false. Save source files.
Default is true.
For example, to transfer the files that begin with "file_" that are located in the workspace directory, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/sendfiles/<connection ID> Accept:application/json IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID> { "targetConnectionType": "as2", "srcDirectoryPath": "C:\\server\\userdata\\workspace", "srcFilePattern": "file_*“ }
For example, to transfer the files with ".txt" pattern, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/sendfiles/<connection ID> Accept:application/json IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID> { "targetConnectionType": "Advanced SFTP V2", "srcDirectoryPath": "C:\\docstoreLocal2", "tgtDirectoryPath": "C:\\server\\userdata\\workspace", "srcFilePattern": ".*txt“ }

POST Response

If successful,
Informatica Intelligent Cloud Services
returns the run ID for the job. Use the run ID to monitor the job status.
The following example shows a successful response:
{ "projectId": 0, "timeTaken": 0, "queuePriority": 0, "runPriority": 0, "runMode": "UNKNOWN", "submitSourceId": -1, "correlationId": "OWMxOTc2YjktNzI4YS00Mm", "runModeInteractive": false, "runModeBatch": false, "runModeDebug": false, "runModeUnknown": true, "formattedTimeTaken": "0.00", "id": 1000000000384, "runId": 385 }
If unsuccessful, the response includes a reason for the failure.