Unified Project Lifecycle APIs

Replace text in project files

Replaces matching text in project files through the unified project API.

Features:

  • Supports literal, whole-word, case-sensitive, and regular-expression matching.
  • Returns one aggregate result contract for Advanced and Mainframe Replication.
  • Delegates matching, preflight, replacement, and persistence to Connect Portal.

Use Cases:

  • Rename a connection reference consistently across project files.
  • Apply a bounded regular-expression replacement before validating a project.

Authorization: Requires replication-pipeline::update when permission harmonization is enabled, or legacy replication-pipeline::manage otherwise.

post/v1/integration/projects/{projectId}/files/replace

Request

  • Base URL: https://integration-adapter.connect.cloud.precisely.com
  • URL: https://integration-adapter.connect.cloud.precisely.com/v1/integration/projects/{projectId}/files/replace
  • Auth: HTTP bearer

Path parameters

projectIdstring required

Unique identifier of the project

Query parameters

projectType'REPLICATION' | 'MAINFRAME_REPLICATION' | 'ADVANCED_REPLICATION'

Supported project types for unified project operations

Optional project type: ADVANCED_REPLICATION | MAINFRAME_REPLICATION

pipelineIdstring

Unique Mainframe Replication pipeline identifier; ignored for Advanced Replication

Request body

searchTermstring required

Text or regular expression to replace

matchCaseboolean

When true, matching is case-sensitive

matchWordboolean

When true, only whole-word matches are replaced

regexboolean

When true, searchTerm is treated as a regular expression

view'CURRENT' | 'COMMITTED'

File-tree view to replace in: CURRENT | COMMITTED

revisionNumberinteger

Optional revision number

maxMatchesPerFileinteger

Maximum matches allowed in one file

maxTotalMatchesinteger

Maximum matches allowed across all files

maxFilesScannedinteger

Maximum number of files to scan

maxBytesScannedinteger

Maximum number of bytes to scan

deadlineSecondsinteger

Maximum operation duration in seconds

includeLineboolean

When true, include the updated line in each replacement match

replacementstring required

Replacement text; an empty string removes matched text

maxChangedBytesinteger

Maximum number of changed output bytes

Example request

{
  "searchTerm": "oracle_source",
  "filesToInclude": [
    {
      "pattern": "sources/*.dis.yaml"
    }
  ],
  "view": "CURRENT",
  "maxMatchesPerFile": 1000,
  "maxTotalMatches": 10000,
  "maxFilesScanned": 50,
  "maxBytesScanned": 104857600,
  "deadlineSeconds": 30,
  "includeLine": true,
  "replacement": "postgres_source",
  "maxChangedBytes": 104857600
}

Response

Project file replacement completed

projectIdstring

Unique identifier of the project

projectType'REPLICATION' | 'MAINFRAME_REPLICATION' | 'ADVANCED_REPLICATION'

Resolved project type

dataFlowIdstring

Resolved portal dataflow identifier

filesScannedinteger

Total number of files scanned; for Mainframe, derived from returned changed-file results

filesMatchedinteger

Number of files containing matches

filesChangedinteger

Number of files changed

matchCountinteger

Total number of matches; for Mainframe, every returned match was replaced

replacementCountinteger

Total number of replacements written

changedBytesinteger

Total UTF-8 bytes written for changed files; unavailable for Mainframe

Example response

{
  "projectId": "project-123",
  "projectType": "ADVANCED_REPLICATION",
  "filesScanned": 12,
  "filesMatched": 2,
  "filesChanged": 2,
  "matchCount": 3,
  "replacementCount": 3,
  "changedBytes": 2048,
  "files": [
    {
      "fileId": "file-002",
      "fileName": "customers.dis.yaml",
      "flattenedPath": "sources/customers.dis.yaml",
      "version": 4,
      "replacementCount": 2,
      "matches": [
        {
          "line": 2,
          "startColumn": 15,
          "endColumn": 28,
          "searchContentResult": "oracle_source"
        }
      ]
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.