Use the job resource to start a file ingestion and replication job. You can also use the job resource to retrieve job status or job logs for a file ingestion and replication task. Use the file ingestion and replication REST API version 1 task resource to retrieve the ID and name of the task.
RUN Request
To start a file ingestion and replication task job, use the following URI:
mftsaas/api/v1/job
Include the following information in the request:
Field
Type
Required
Description
taskId
String
Yes
File ingestion and replication ID.
taskName
String
-
File ingestion and replication name.
Use the following source directory and target directory keys for the specified connectors when you start a file ingestion and replication job:
Connector
srcDir
tgtDir
local
sourceDirectory
targetDirectory
ftp,ftps,sftp
sourceDirectory
targetDirectory
gcs
sourceDirectory
gcsTargetLocation
hdfs
sourceDirectory
hdfsTargetLocation
adlsgen2
sourceDirectory
adlsGen2TargetLocation
s3
s3SourceLocation
s3TargetLocation
blob
blobSourceLocation
blobContainer
You can overwrite the following parameters using the job resource REST API:
Category
Parameter
ID
General
Source Connection
sourceConnection
General
Target Connection
targetConnection
General
Parallel Batch Log Level
parallelBatch
General
Log Level
logLevel
Source
Source Directory
sourceDirectory
Source
File Pattern
filePattern
Source
Batch Size
batchSize
Source
Include files from sub-folders
includeSubfolder
Source
Skip Duplicate files
checkDuplicate
Source
Check File Stability
fileStability
Source
Stability Check Interval
stabilityCheckInterval
Target
Target Directory
targetDirectory
Note: You must pass the connection ID to overwrite the source and target connection parameters.
Use the following sample as a reference to start a file ingestion and replication task job:
In the following example, the parameter value that were passed in the user interface is overwritten to corresponding values provided in JSON POST while using the job resource REST API:
If successful, file ingestion and replication returns the run ID for the job. Use the run ID to monitor the job status and request log files for the job.
If unsuccessful, the response includes a reason for the failure.
GET Status Request
To retrieve the status of a specific file ingestion and replication task job, use the following URI:
mftsaas/api/v1/job/<runId>/status
GET Status Response
If successful, file ingestion and replication returns the job status and the job details, which includes a list of files and the details and status of each file.
If unsuccessful, the response includes a reason for the failure.
GET Job Logs Request
To retrieve the log files for a specific file ingestion and replication task job, use the following URI:
mftsaas/api/v1/job/<runId>/logs
GET Job Logs Response
If successful, file ingestion and replication returns the log files for the job.
If unsuccessful, the response includes a reason for the failure.