REST API Reference > Data Integration REST API > File transfer
  

File transfer

You can send files to a remote server or receive files from a remote server, and get the job status through the REST API.
Use the following resources for file transfer:
When you use these resources, note the following rules:
Note: You must have the appropriate connector license to send and receive files.

Transferring files to a remote server

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:
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.

Receiving files from a remote server

Use the receivefiles resource to get files from a remote server.
The following connection types use the receivefiles resource to transfer files to the remote server:
Before you construct a receivefiles request to receive 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 receive files, include the connection ID in the following URI.
mftsaas/api/v1/receivefiles/<connection ID>
Include the following information in the request:
Field
Type
Required
Description
sourceConnectionType
String
Yes
Connection type.
The supported source connection types are:
  • - Advanced FTP V2
  • - Advanced FTPS V2
  • - Advanced SFTP V2
tgtDirectoryPath
String
Yes
Directory path to where files are transferred.
srcDirectoryPath
String
-
Directory path from where files are transferred.
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.
processFilesRecursively
String
-
Whether to process files from all sub-folders within the base directory. Default is false.
afterFilePickupAction
String
-
Determines what to do with source files after the files transfer. The following options are available:
  • - Keep the files in the source directory.
  • - Delete the files from the source directory.
  • - Rename the files in the source directory. You must specify a file name suffix that adds to the file name when renaming the files.
  • - Archive the files to a different location. You must specify an archive directory.
Default is KEEP.
skipDuplicateFiles
String
-
Do not transfer duplicate files. If files with the same name and creation date were transferred, the task does not transfer them again, and the files are marked as duplicate in the job log. If this option is not selected the task transfers all files.
Default is false.
whenFileExists
String
-
Determines what to do with a file if a flat file with the same name exists in the target directory. The following options are available:
  • - rename
  • - overwrite
  • - skip
  • - stop
  • - error
Default is rename.
For example, to transfer the files with ".txt" pattern, and rename the file if a flat file with same name exists in the target 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>
{
"sourceConnectionType": "Advanced SFTP V2",
"tgtDirectoryPath": "C:\\docstoreLocal2",
"srcDirectoryPath": "C:\\server\\userdata\\workspace",
"srcFilePattern": ".*txt“,
"processFilesRecursively": false,
"afterFilePickupAction": "KEEP",
"skipDuplicateFiles": false,
"whenFileExists": "rename",
}

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.

Getting job status

When you use the REST API to send or receive files, use the REST API version 1 job resource to get the status of the file transfer.
Do not use the platform REST API version 2 job resource to get the status of an file transfer job.

GET Request

When you send the request for status of an file transfer job, include the run ID returned in the sendfiles POST response. Use the following URI:
mftsaas/api/v1/job/<runID>/status

GET Response

If successful, Data Integration returns the job status.
If unsuccessful, the response includes a reason for the failure.

GET Response Example

If the request is successful, you might receive a response similar to the following example:
{
"jobStatus": "SUCCESS"
}

File transfer tasks

Use the filetransferTask resource to decrypt or decompress inbound files and to encrypt or compress outbound files.
You can transfer files in the following ways:

Hosted file transfer task

You can manage files on a hosted server, and transfer files locally.
You can perform the following actions:

Compress and transfer files

Compress and transfer inbound files to or within a folder specified in the home directory of the file server user.

POST Request

To compress and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1003
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
portalUser
String
-
Whether the user is a portal user. Default is false.
fileServerUsername
String
Yes
The user name of the file server.
relativeTargetLocation
String
-
The relative target location within the file server user’s home directory.
pattern
String
Yes
The file pattern to identify the files to collect for compression. The regular expression pattern is supported.
sourceLocation
String
Yes
The source directory that contains the files that you want to compress.
COMPRESSION_TYPE
String
Yes
The format of the files that you want to compress.
Select one of the following compression methods:
  • - Zip
  • - Tar
  • - Gzip
The values are not case sensitive.
For example, to compress and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1003
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"fileServerUsername": "arun",
"portalUser":true,
"relativeTargetLocation":"",
"pattern":"arun.csv",
"sourceLocation":"C:\\Informatica_Source",
"taskVariables": {
"COMPRESSION_TYPE": "zip"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007154,
"runId": 13
}
If unsuccessful, the response includes a reason for the failure.

Decompress and transfer files

Decompress and transfer the uploaded files from the home directory of file server user to the target location.

POST Request

To decompress and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1004
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
fileServerUsername
String
Yes
The user name of the file server.
pattern
String
Yes
The file pattern of the file to release to the specified target location after decompressing the file. The regular expression pattern is supported.
targetLocation
String
Yes
The target directory to which the file is moved after decompressing.
DECOMPRESSION_TYPE
String
Yes
The format of the files that you want to decompress.
Select one of the following decompression methods:
  • - Zip
  • - Tar
  • - Gzip
The values are not case sensitive.
PATTERN_CASE_SENSITIVE
String
-
Whether the file pattern is case sensitive. The values are not case sensitive. Default is false.
PATTERN _TO_COLLECT
String
Yes
The pattern of the file that you want to collect to decompress from the file server user’s home directory. Use a regular expression to match the file name pattern.
For example, to decompress and transfer a file, you might use the following request
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1004
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"fileServerUsername": "arun",
"pattern":".*csv",
"targetLocation":"C:\\Informatica_Target",
"taskVariables": {
"PATTERN_CASE_SENSITIVE": "false",
"DECOMPRESSION_TYPE": "unzip",
"PATTERN_TO_COLLECT": ".*zip"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007161,
"runId": 20
}
If unsuccessful, the response includes a reason for the failure.

Encrypt and transfer files

Encrypt and transfer files from the source location to the home directory of the file server user or the directory specified in the REST API param within the file server user’s home directory. You can encrypt single or multiple files.

POST Request

To encrypt and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1001
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
portalUser
String
-
Whether the user is a portal user. Default is false.
fileServerUsername
String
Yes
The user name of the file server.
relativeTargetLocation
String
-
The relative target location within the file server user’s home directory.
pattern
String
Yes
The file pattern to identify the files to collect for encryption. The regular expression pattern is supported.
sourceLocation
String
Yes
The source directory that contains the files you want to encrypt.
SIGN
String
-
Whether the file is signed by PGP. The values are not case sensitive.
Default is false.
PUBLIC_KEY_ID
String
Yes
The ID of the key that is used to encrypt the file.
SECRET_KEY_ID
String
Yes
The ID of the secret key that is used to sign the file, if the value of the SIGN variable is true.
SECRET_KEY_PASSPHRASE
String
Yes
The passphrase used to access the secret key if the value of the SIGN variable is true.
For example, to encrypt and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1001
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"fileServerUsername": "arun",
"portalUser":true,
"pattern":"arun.csv",
"relativeTargetLocation":"",
"sourceLocation":"C:\\Informatica_Source",
"taskVariables": {
"SIGN":"false",
"PUBLIC_KEY_ID":"0x51986F687ADACBE1",
"SECRET_KEY_ID":"0x51986F687ADACBE1",
"SECRET_KEY_PASSPHRASE":"TESTER"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007155,
"runId": 14
}
If unsuccessful, the response includes a reason for the failure.

Decrypt and transfer files

Decrypt and transfer files from the file server user’s home directory to the target location.

POST Request

To decrypt and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1002
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
fileServerUsername
String
Yes
The user name of the file server.
pattern
String
Yes
The file pattern of the file to release to the specified target location after decrypting the file. The regular expression pattern is supported.
targetLocation
String
Yes
The target directory to which the file is moved after decryption.
PATTERN_CASE_SENSITIVE
String
Yes
Whether the file pattern is case sensitive. The values are not case sensitive.
Default is false.
PGP_PASSPHRASE
String
Yes
The PGP passphrase.
PATTERN _TO_COLLECT
String
Yes
The file name pattern of the files that PGP has to collect and decrypt. Use a regular expression to match the file name pattern.
For example, to decrypt and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1002
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"fileServerUsername": "arun",
"pattern":".*csv",
"targetLocation":"C:\\Informatica_Target",
"taskVariables": {
"PATTERN_CASE_SENSITIVE": "false",
"PGP_PASSPHRASE": "TESTER",
"PATTERN_TO_COLLECT": ".*pgp"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007160,
"runId": 19
}
If unsuccessful, the response includes a reason for the failure.

Remote file transfer task

You can manage the files on a remote server using Advanced FTP V2, Advanced FTPS V2, and Advanced SFTP V2 connectors, and transfer files from or to a remote server.
You can perform the following actions:

Compress and transfer files

Compress and transfer inbound files to or within a folder specified in the home directory of the remote server.

POST Request

To compress and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1003
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
portalUser
String
-
Whether the user is a portal user. Default is false.
connectionId
String
Yes
The connection ID of the Advanced FTP, Advanced FTPS, or Advanced SFTP V2 connector.
relativeTargetLocation
String
-
The relative target location within the remote server home directory.
pattern
String
Yes
The file pattern to identify the files to collect for compression. The regular expression pattern is supported.
sourceLocation
String
Yes
The source directory that contains the files that you want to compress.
COMPRESSION_TYPE
String
Yes
The format of the files that you want to compress.
Select one of the following compression methods:
  • - Zip
  • - Tar
  • - Gzip
The values are not case sensitive.
For example, to compress and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1003
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"portalUser": "false",
"connectionId": "0100010B000000000002",
"pattern":"arun_zip.txt",
"relativeTargetLocation":"/",
"sourceLocation":"C:\\FIS_Home\\DOCSTORE",
"taskVariables": {
"COMPRESSION_TYPE": "gzip"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007170,
"runId": 29
}
If unsuccessful, the response includes a reason for the failure.

Decompress and transfer files

Decompress and transfer the uploaded files from the home directory of the remote server to the target location.

POST Request

To decompress and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1004
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
portalUser
String
-
Whether the user is a portal user. Default is false.
relativeSourceLocation
String
-
The relative source location within the remote server home directory.
pattern
String
Yes
The file pattern of the file to release to the specified target location after decompressing the file. The regular expression pattern is supported.
targetLocation
String
Yes
The target directory to which the file is moved after decompressing.
relativeTargetLocation
String
-
The relative target location within the remote server home directory.
connectionId
String
Yes
The connection ID of the Advanced FTP, Advanced FTPS, or Advanced SFTP V2 connector.
afterFilePickupAction
String
-
Determines what to do with the source files after the files are transferred.
Select one of the following filter options:
  • - KEEP. Keep the files in the source directory.
  • - DELETE. Delete the files from the source directory.
  • - RENAME. Rename the files in the source directory.
  • - ARCHIVE. Archive the files to a different location. You must specify an archive directory
Default is KEEP.
renameSuffix
String
Yes
If afterFilePickupAction is selected as RENAME, the file name suffix to append to the files in the source directory.
You can use the following suffix types:
  • - $date
  • - $time
  • - $runId
  • - $timestamp
archiveDirectoryPath
String
Yes
If afterFilePickupAction is selected as ARCHIVE, the archive directory in which to archive the files.
skipDuplicateFiles
String
-
Indicates whether to skip the source files which are already present in the docstore location. Default is false.
processFilesRecursively
String
-
Indicates whether to process files from all sub-folders within the base directory. Default is false.
DECOMPRESSION_TYPE
String
Yes
The format of the files that you want to decompress.
Select one of the following decompression methods:
  • - Zip
  • - Tar
  • - Gzip
The values are not case sensitive.
PATTERN _TO_COLLECT
String
Yes
The pattern of the file that you want to collect to decompress from the file server user’s home directory. Use a regular expression to match the file name pattern.
For example, to decompress and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1004
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"portalUser": "false",
"pattern": "arun_zip.txt",
"relativeSourceLocation": "/",
"targetLocation": "C:\\Informatica_Target",
"relativeTargetLocation": "",
"connectionId": "0100010B000000000002",
"afterFilePickupAction": "RENAME",
"renameSuffix":"_RENAME_",
"archiveDirectoryPath" :"",
"skipDuplicateFiles": true,
"processFilesRecursively": false,
"taskVariables": {
"DECOMPRESSION_TYPE": "gunzip",
"PATTERN_TO_COLLECT": ".*gz"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007171,
"runId": 30
}
If unsuccessful, the response includes a reason for the failure.

Encrypt and transfer files

Encrypt and transfer files from the source location to a remote server using connectors or to the directory specified in the REST API param within the remote server's home directory. You can encrypt single or multiple files.

POST Request

To encrypt and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1001
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
connectionId
String
Yes
The connection ID of the Advanced FTP, Advanced FTPS, or Advanced SFTP V2 connector.
portalUser
String
-
Whether the user is a portal user. Default is false.
relativeTargetLocation
String
-
The relative target location within the remote server home directory.
pattern
String
Yes
The file pattern to identify the files to collect for encryption. The regular expression pattern is supported.
sourceLocation
String
Yes
The source directory that contains the files you want to encrypt.
SIGN
String
-
Whether the file is signed by PGP. The values are not case sensitive.
Default is false.
PUBLIC_KEY_ID
String
Yes
The ID of the key that is used to encrypt the file.
SECRET_KEY_ID
String
Yes
The ID of the secret key that is used to sign the file, if the value of the SIGN variable is true.
SECRET_KEY_PASSPHRASE
String
Yes
The passphrase used to access the secret key if the value of the SIGN variable is true.
For example, to encrypt and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1001
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"portalUser": "false",
"connectionId": "0100010B000000000002",
"pattern":"arun.txt",
"relativeTargetLocation":"/",
"sourceLocation":"C:\\FIS_Home\\DOCSTORE",
"taskVariables": {
"SIGN":"true",
"PUBLIC_KEY_ID":"0x51986F687ADACBE1",
"SECRET_KEY_ID":"0x51986F687ADACBE1",
"SECRET_KEY_PASSPHRASE":"TESTER"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007165,
"runId": 24
}
If unsuccessful, the response includes a reason for the failure.

Decrypt and transfer files

Decrypt and transfer files from the remote server home directory to the target location.

POST Request

To decrypt and transfer files, include the connection ID in the following URI.
mftsaas/api/v1/filetransferTask/execute/1002
Include the following information in the request:
Field
Type
Required
Description
agentGroupId
String
Yes
The ID of the agent group.
portalUser
String
-
Whether the user is a portal user. Default is false.
relativeSourceLocation
String
-
The relative source location within the remote server home directory.
pattern
String
Yes
The file pattern of the file to release to the specified target location after decrypting the file. The regular expression pattern is supported.
targetLocation
String
Yes
The target directory to which the file is moved after decrypting.
relativeTargetLocation
String
-
The relative target location within the remote server home directory.
connectionId
String
Yes
The connection ID of the Advanced FTP, Advanced FTPS, or Advanced SFTP V2 connector.
afterFilePickupAction
String
-
Determines what to do with the source files after the files are transferred.
Select one of the following filter options:
  • - KEEP. Keep the files in the source directory.
  • - DELETE. Delete the files from the source directory.
  • - RENAME. Rename the files in the source directory.
  • - ARCHIVE. Archive the files to a different location. You must specify an archive directory
Default is KEEP.
renameSuffix
String
Yes
If afterFilePickupAction is selected as RENAME, the file name suffix to append to the files in the source directory.
You can use the following suffix types:
  • - $date
  • - $time
  • - $runId
  • - $timestamp
archiveDirectoryPath
String
Yes
If afterFilePickupAction is selected as ARCHIVE, the archive directory in which to archive the files.
skipDuplicateFiles
String
-
Indicates whether to skip the source files which are already present in the docstore location. Default is false.
processFilesRecursively
String
-
Indicates whether to process files from all sub-folders within the base directory. Default is false.
PATTERN_CASE_SENSITIVE
String
Yes
Whether the file pattern is case sensitive. The values are not case sensitive.
Default is false.
PGP_PASSPHRASE
String
Yes
The PGP passphrase.
PATTERN _TO_COLLECT
String
Yes
The pattern of the file that you want to collect to decompress from the file server user’s home directory. Use a regular expression to match the file name pattern.
For example, to decrypt and transfer a file, you might use the following request:
POST <serverUrl>/mftsaas/api/v1/filetransferTask/execute/1002
Accept:application/json
IDS-SESSION-ID: <icSessionId or INFA-SESSION-ID>
{
"agentGroupId": "01000125000000000002",
"portalUser": "false",
"pattern": "arun.txt",
"relativeSourceLocation": "/",
"targetLocation": "C:\\Informatica_Target",
"relativeTargetLocation": "",
"connectionId": "0100010B000000000002",
"afterFilePickupAction": "ARCHIVE",
"renameSuffix":"_RENAME_",
"archiveDirectoryPath" :"/ARCH",
"skipDuplicateFiles": false,
"processFilesRecursively": false,
"taskVariables": {
"PATTERN_CASE_SENSITIVE": "false",
"PGP_PASSPHRASE": "TESTER",
"PATTERN_TO_COLLECT": "arun.txt.pgp"
}
}

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,
"runModeInteractive": false,
"runModeBatch": false,
"runModeDebug": false,
"runModeUnknown": true,
"formattedTimeTaken": "0.00",
"id": 1000000007169,
"runId": 28
}
If unsuccessful, the response includes a reason for the failure.

HTTPS file transfer

You can send files to a remote HTTPS server or receive files from a remote HTTPS server, and get the job status through the REST API.
Consider the following when you use the resources for HTTPS file transfer:
You can use the following resources for HTTPS file transfer:

Authentication

Use the following resources to log in to the HTTP server and log out.
login
You should log in to the HTTPS server to perform any HTTPS API operations. Use this command to lg in to the HTTPS server. To log in to the Informatica Managed File Transfer HTTPS Server send a POST request using the login resource. You must send a login request to start a user session if you don't use client certificate authentication.
Include the following parameters in the request:
For example: https://10.60.40.11:15400/fileservers/login?username=https_automation&password=T@1234
logout
Use the logout resource to log out and end the user session on the Informatica Managed File Transfer HTTPS Server. You can make a GET or POST request.
For example, https://10.60.40.11:15400/fileservers/logout

Standard operations

You can use the following standard operational commands:
PWD
Use the PWD (Print Working Directory) command to retrieve the current working directory on the server. The response includes the absolute path to the current working directory as part of the X-GDX-Reply header message. The path is enclosed in double quotes.
For example, https://localhost:15400/fileservers/pwd
delete
Use this command to remove files from the server. Include the relative or absolute file path to delete in the file parameter.
For example, https://10.60.40.11:15400/fileservers/delete?file=/abc/1.txt
rename
Use this command to rename files on the server. If the current working directory contains the files that you want to rename, then the from and to parameters might contain only the file names. You can also use the rename command to move files on the server. To move files, include the full paths in the from and to parameters.
For example, the following command changes the name of the newInput.txt file to Input.txt:
https://10.60.40.11:15400/fileservers/rename?from=/newInput.txt&;to=/Input.txt
For example, the following command moves the newInput.txt file from the current working directory to the parent directory:
https://10.60.40.11:15400/fileservers/rename?from=/newInput.txt&to=/aa/newInput.txt
Include the following parameters in the request:
Request Type
Parameters
GET or POST
  • - from: The relative or absolute path of the file or directory to rename.
  • - to: The relative or absolute path of the new name.
list
Use this command to list the contents of a directory on the server. Include the target directory as a parameter to this command. If you do not include the directory, the command lists the contents of the current working directory.
For example, https://10.60.40.11:15400/fileservers/list?dir=/
The response body includes the contents of the directory in content type text/plain. The following example shows the format of the directory listing:
2009-12-03 14:02:19 D 0 backup
The response includes the following information delimited by a tab (\t) character:
checksum
Use this command to calculate the hash of a remote file. The reply is returned on the first line of the response body. You can compare the response with the hash value of the downloaded local file to verify data integrity.
For example, https://10.60.40.11:15400/fileservers/hash?file=/input.txt
The supported hash algorithms are SHA1, MD5, and CRC32. Include the following parameters in the request:
Request Type
Parameters
GET or POST
  • - file: Required. The path relative to the current working directory, or an absolute path to the file.
  • - algorithm: The hash algorithm to use when calculating a checksum. Valid values are SHA1, MD5, or CRC32. Default is SHA1.
  • - length: The starting position within the file. This value is used for calculating partial file checksums. The default value is 0, which performs the checksum on the entire file.
CD (Change Directory)
Use this command to change the current working directory. The absolute path to the new working directory returns as part of the X-GDX-Reply header message. The path is enclosed in double quotes.
For example, https://10.60.40.11:15400/fileservers/cd?dir=/
CDUP (Change Directory Up)
Use this command to change the current working directory to the parent directory. The absolute path to the new working directory returns as part of the X-GDX-Reply header message. The path is enclosed in double quotes.
For example, https://10.60.40.11:15400/fileservers/cdup
MKDIR (Make Directory)
Use this command to create a new directory on the server. The absolute path to the newly created directory returns as part of the X-GDX-Reply header message. The path is enclosed in double quotes.
For example, https://10.60.40.11:15400/fileservers/mkdir?dir=/a/b/c/mkdri1
file information
Use this command to retrieve information about a specific file or directory. The response includes the information in the response body with content type text/plain. The format of the file information is identical to the listing returned from the List command. If no information is returned in the response body, then the file or directory does not exist.
For example, https://10.60.40.11:15400/fileservers/fileInfo?file=/TEST.txt

File transfer

Use the following commands to transfer an HTTPS file to or from a server:
upload
Use this command to transfer a file to the server. The request must be a multipart POST request and only one file is uploaded per request. A file is a required part of the multipart request, but any parameter name given to the file part is ignored.
For example, https://10.60.40.11:15400/fileservers/upload
The response includes the following parameters:
Request Type
Parameters
POST/Multipart
  • - to: The relative or absolute path of the destination file.
  • - file: The file being uploaded as part of the multipart request.
upload2
Use this command to transfer a file to the server. The request must be a multipart POST request and only one file is uploaded per request. A file is a required part of the multipart request, but any parameter name given to the file part is ignored.
For example, https://10.60.40.11:15400/fileservers/upload2
The response includes the following parameters:
Request Type
Parameters
POST/Multipart
  • - to: The relative or absolute path of the destination file.
  • - append: Optional. If the file exists on the target directory, set this parameter to true to append the new file to the existing one.
  • - transferMode: Use B for binary transfers or A for ascii transfers. Default is B.
  • - file: The file being uploaded as part of the multipart request.
upload3
Use this command to transfer a file to the server. The request must be a multipart POST request and only one file is uploaded per request. A file is a required part of the multipart request, but any parameter name given to the file part is ignored.
For example, https://10.60.40.11:15400/fileservers/upload3
You must provide the fileserver username and password for basic authorization.
The response includes the following parameters:
Request Type
Parameters
POST/Multipart
  • - to: The relative or absolute path of the destination file.
  • - append: Optional. If the file exists on the target directory, set this parameter to true to append the new file to the existing one.
  • - transferMode: Use B for binary transfers or A for ascii transfers. Default is B.
  • - file: The file being uploaded as part of the multipart request.
uploadRawData
Use this command to upload data directly to the server where the data is the content of the request body. The request must be a POST request. The name of the file is automatically derived and returned as part of the X-GDX-Reply header message. This is a special command where the request body must contain the file data being uploaded.
For example, https://10.60.40.11:15400/fileservers/uploadRawData
uploadRawData2
Use this command to upload data directly to the server where the data is the content of the request body. The request must be a POST request. The name of the file is automatically derived and returned as part of the X-GDX-Reply header message. This is a special command where the request body must contain the file data being uploaded.
For example, https://10.60.40.11:15400/fileservers/uploadRawData2
You must provide the fileserver username and password for basic authorization.
download
Use this command to download a file from the server. The file is returned as the response body. The content type is always an application or force download, along with the content disposition field containing the name of the file. The content-length header is also included in the response indicating the size of the file.
For example, https://10.60.40.11:15400/fileservers/download?file=/test&downloadReleased=true&transferMode=b
The response includes the following parameters:
Request Type
Parameters
GET or POST
  • - file: Required. The file to download. This can be a path relative to the current working directory, or an absolute path to the file.
  • - offset: For downloading partial files. Enter the starting position from where the file must begin to download.
  • - transferMode: Use B for binary transfers or A for ascii transfers. Default is B.

Server responses

For every request, the server responds with success or error codes and messages specific to the HTTPS service in the X-CDX-Reply header. The format of the header message is a status code followed by a single white space, followed by the message details.
For example, 200 Welcome, testuser!
You can use header codes and messages to determine the success or failure of an operation.

Status codes

A response might include any of the following HTTPS file transfer status codes:
200-299
Informational or success status codes: Successful operation performed against the server .
500-509
Internal server error: The server experienced a critical error. Contact the server’s administrator immediately.
510-519
Bad or Invalid request: The server could not process the request due to invalid or incomplete information. See the X-GDX-Reply header message for more details.
530-539
Login or account related errors: Indicates that an error occurred with the account or login, such as invalid login or account disabled. See the X-GDX-Reply header message for more details.
550-559
Permission errors: The user does not have permission or authority to perform the requested action. See the X-GDX-Reply header message for more details.
560-569
Errors related to files or directories on the system: An error occurred while accessing a file or directory on the server, such as a file or directory does not exist.
580-589
File I/O Errors: An internal server error occurred while trying to access a file or directory.
590
Unknown error: An unexpected error occurred while trying to process the command. See the X-GDX-Reply header message for more details.