---
title: "Upload multiple mainframe files"
method: POST
path: "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload"
tags: ["Build and Configure Mainframe Integration Projects"]
---

# Upload multiple mainframe files

`POST /v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload`

## Request

- Base URL: `https://integration-adapter.connect.cloud.precisely.com`
- URL: `https://integration-adapter.connect.cloud.precisely.com/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/upload`
- Auth: HTTP bearer

Uploads multiple mainframe files to a specified directory path within the pipeline using batch upload API.

**Process Overview:**
1. **Request Validation** - Validates path and file list
2. **Resolution Strategy** - Applies specified conflict resolution (REPLACE_ALL, IGNORE_ALL, PARTIAL)
3. **Batch Upload** - Uploads all files in a single operation
4. **Result Aggregation** - Returns success/failure results for all files

**Conflict Resolution Strategies:**
- `REPLACE_ALL` - Replace all existing files with conflicting names
- `IGNORE_ALL` - Skip all files with conflicting names, keep originals
- `PARTIAL` - Replace only files specified in `replaceFiles` list, others are ignored

**Archive Expansion:**
- When uploading a single ZIP file with `expandArchive=true`, the archive will be extracted
- Individual files will be created from the archive contents
- For multiple files, expandArchive is ignored

**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

**Path Handling:**
- Files are uploaded to the specified directory path
- Directory path (e.g., '/path/to') is used as prefix for all uploaded files

**Use Cases:**
- Bulk import of configuration files
- Upload multiple scripts at once
- Initial pipeline setup with multiple files

**Required Permissions:** `replication-pipeline::create` when permission harmonization is enabled; otherwise, `replication-pipeline::manage`.

## Path parameters

- `projectId` string, required
- `pipelineId` string, required

## Query parameters

- `conflictResolution` 'REPLACE_ALL' | 'IGNORE_ALL' | 'PARTIAL'

## Response `200`

Upload completed (check response for individual file results)

- MainframeFileOperationResponse: Represents the response of a mainframe file operation such as upload. rename etc.
  - `filesCreated` string[]: List of files that were renamed during the operation.
  - `filesRenamed` string[]: List of files that were renamed during the operation.
  - `filesConflicted` string[]: List of files that were conflicted during the operation.
  - `filesUpdated` string[]: List of files that were updated during the operation.
  - `filesDeleted` string[]: List of files that were deleted during the operation.
  - `filesIgnored` string[]: List of files that were ignored during the operation.
  - `errors` string[]: List of error messages encountered during the operation.

## Other responses

- `400`: Bad Request - Validation failed due to one of the following reasons: - Invalid project ID - Invalid pipeline ID - Invalid path format - Empty file list - More than 200 files
- `401`: Unauthorized - Authentication required, valid credentials not provided
- `403`: Forbidden - User lacks the required 'replication-pipeline::create' or legacy 'replication-pipeline::manage' permission
- `404`: Not Found - Pipeline does not exist
- `500`: Internal Server Error - Server encountered an unexpected condition, such as: - File upload operation failure

---

[API](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service.md) · [All operations](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/precisely-integration-adapter-service/revisions/2d2629f4987d?raw)
