---
title: "Run mainframe file hash migration"
method: POST
path: "/v1/integration/mainframe/projects/{projectId}/pipelines/{pipelineId}/files/migration"
tags: ["Build and Configure Mainframe Integration Projects"]
---

# Run mainframe file hash migration

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

## 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/migration`
- Auth: HTTP bearer

Backfills missing content hashes for Mainframe pipeline files so editable-sync and conflict detection can operate reliably.

**Feature Context:**
- Supports migration of legacy pipelines where file hashes were not persisted.
- Enables hash-based compatibility checks required by pull/link-folder workflows.

**Use Cases:**
- **Targeted migration** for specific files by providing `fileIds`.
- **Pipeline-wide migration** by sending an empty request body or an empty `fileIds` list.

**Request Semantics:**
- `fileIds` omitted or empty: migrate all eligible files in the pipeline.
- `fileIds` present: migrate only matching IDs in the current pipeline.

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

## Path parameters

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

## Request body

- MainframeHashMigrationRequest: Request payload to trigger content-hash backfill for mainframe files
  - `fileIds` string[]: Optional list of file IDs to migrate. If omitted or empty, migration targets all files in the pipeline that need hash backfill.

## Response `200`

Hash migration completed

- MainframeHashMigrationResponse: Result of mainframe hash migration
  - `updated` integer: Count of files considered updated during migration
  - `skipped` integer: Count of files skipped during migration
  - `failed` integer: Count of files that failed migration
  - `compatibilityReady` boolean: Whether pipeline is compatibility-ready after migration

## Other responses

- `400`: Invalid request
- `403`: Forbidden
- `404`: Pipeline not found
- `500`: Unexpected migration 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)
