Uploads multiple mainframe files to a specified directory path within the pipeline using batch upload API.
HTML
POST https://hostname/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/uploadProcess overview
- Request Validation—Validates path and file list.
- Resolution Strategy—Applies specified conflict resolution (
REPLACE_ALL,IGNORE_ALL,PARTIAL). - Batch Upload—Uploads all files in a single operation.
- Result Aggregation—Returns success/failure results for all files.
Key features
- Batch upload support for multiple files
- ZIP archive expansion for single file uploads
- Automatic path handling (uses path as prefix for all files)
- Lists created, conflicted, updated, and ignored files
Use cases
- Bulk import of configuration files.
- Upload multiple scripts at once.
- Initial pipeline setup with multiple files
Required permissions
replication-pipeline::manage
Request
Path parameters
| Key | Required | Type | Description |
|---|---|---|---|
| projectId | Yes | string |
Specifies the unique identifier of the project. |
| pipelineId | Yes | string |
Specifies the unique identifier of the pipeline. |
Query parameters
| Key | Required | Type | Description |
|---|---|---|---|
| conflictResolution | No | string |
Conflict resolution strategy to use when name conflicts occur.
|
Request body properties
| Property | Required | Type | Description |
|---|---|---|---|
| path | Yes | string | The target directory path where files will be uploaded. The path is used as prefix for all uploaded files. Example:
scripts/config |
| files | Yes | array[string] | List of files to upload. The maximum is 200 files. Example:
["file-latest.txt","config-latest.jcl"] |
| replaceFiles | No | array[string] | List of file names to be replaced if they already exist. Only applicable for PARTIAL conflict resolution. Example:
["file1.txt","config.jcl"] |
| expandArchive | No | boolean | Specifies whether to expand archive (ZIP) files. This parameter only applies when uploading a single file. The default is true. When uploading a single ZIP file with |
Response
The operation returns the 200 status code after successfully completing the file upload. Check the response for individual file results.
Response body properties
| Property | Required | Type | Description |
|---|---|---|---|
| filesCreated | No | array[string] | List of files that were created during the operation. Example:
"file1.txt,file2.txt" |
| filesRenamed | No | array[string] | List of files that were renamed during the operation. Example:
"oldName.txt -> newName.txt" |
| filesConflicted | No | array[string] | List of files that were conflicted during the operation. Example:
"conflictedFile1.txt,conflictedFile2.txt" |
| filesUpdated | No | array[string] | List of files that were updated during the operation. Example:
"fileA.txt,fileB.txt" |
| filesDeleted | No | array[string] | List of files that were deleted during the operation. Example:
"fileX.txt,fileY.txt" |
| filesIgnored | No | array[string] | List of files that were ignored during the operation. Example:
"ignoredFile1.txt,ignoredFile2.txt" |
| errors | No | array[string] | List of error messages encountered during the operation. Example:
"Error message 1,Error message 2" |
Response body examples
Example status code responses for this method are shown here. To view the response schemas, you can download the Data Integration API specification (Precisely Integration Adapter Service) from the Precisely Developer Portal.
{
"filesCreated": [
"file1.txt",
"config.jcl"
],
"filesConflicted": [
"existingFile.txt"
],
"filesUpdated": [
"updatedScript.sh"
],
"filesIgnored": [
"ignoredFile.log"
],
"errors": [
"Error uploading file2.txt: reason"
]
}
{
"type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.1",
"title": "Bad Request",
"status": 400,
"detail": "Validation error occurred",
"instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload",
"properties": {
"errorCode": "DI-ADAPTER-VAL-0000"
}
}
{
"type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.2",
"title": "Unauthorized",
"status": 401,
"detail": "Authorization failed - missing or invalid credentials",
"instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload",
"properties": {
"errorCode": "DI-ADAPTER-AUT-0001"
}
}
{
"type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.4",
"title": "Forbidden",
"status": 403,
"detail": "Authorization failed - insufficient permissions",
"instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload",
"properties": {
"errorCode": "DI-ADAPTER-AUT-0002"
}
}
{
"type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.5",
"title": "Not Found",
"status": 404,
"detail": "Not Found - Resource does not exist",
"instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload",
"properties": {
"errorCode": "DI-ADAPTER-DFL-0007"
}
}
{
"type": "https://datatracker.ietf.org/doc/html/rfc9110#section-15.6",
"title": "Internal Server Error",
"status": 500,
"detail": "An unexpected error occurred",
"instance": "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload",
"properties": {
"errorCode": "DI-ADAPTER-MFF-0001"
}
}