Send files

Use the sendfiles resource to transfer files to a remote server.

Before you construct a sendfiles request to transfer AS2 files, obtain the identifier of the AS2 connection that provides access to the AS2 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:

targetConnectionTypeStringYesConnection type. To transfer files to an AS2 server, specify "as2".
srcDirectoryPathStringYesDirectory path to the files you want to transfer.
srcFilePatternStringYesSource file name pattern. Specify a file name pattern to identify which files to send. You can use the asterisk (*) wildcard in the file name pattern.
deleteSourceFilesStringWhether 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> 
         "targetConnectionType":   "as2",
         "srcDirectoryPath":  "C:\\server\\userdata\\workspace",
         "srcFilePattern":  "file_*“

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