Unified Project Lifecycle APIs

Update one project file

Updates one project file through the unified project API. The request content is a Base64-encoded string. The response returns updated metadata and a new ETag; it does not return decoded content.

Features:

  • Supports optimistic concurrency via the If-Match request header.
  • Fails with a precondition-failed response when the file was changed since it was opened.
  • Skips the write and returns unchanged: true when the submitted content, mimeType, and encoding already match the stored file (for example, a retried autosave); the file's version is not incremented in that case.

Use Cases:

  • VS Code extension saves edits to an open file.
  • User applies a content patch to an existing file.

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

put/v1/integration/projects/{projectId}/files/{fileId}

Request

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

Path parameters

projectIdstring required

Unique identifier of the project

fileIdstring required

Unique identifier of the file to update

Query parameters

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

Supported project types for unified project operations

Project type (required for routing): REPLICATION | MAINFRAME_REPLICATION | ADVANCED_REPLICATION

pipelineIdstring

Unique identifier of the Mainframe Replication pipeline (Mainframe Replication only). Ignored for Advanced Replication.

revisionNumberinteger

Optional revision number targeted by the update

Headers

If-Matchstring

Optional If-Match header value for optimistic concurrency control

Request body

contentstring

Base64-encoded file content, decoded using the declared encoding

mimeTypestring

MIME type of the file content

encodingstring

Encoding used to decode the Base64 content

expectedVersioninteger

Expected current version, used for optimistic concurrency

Example request

{
  "content": "c291cmNlOlxuICBjb25uZWN0aW9uOiBvcmFjbGVfc291cmNlXG4gIHNjaGVtYTogUFVCTElDXG4=",
  "mimeType": "application/yaml",
  "encoding": "utf-8",
  "expectedVersion": 1
}

Response

File updated successfully

fileIdstring

Unique identifier of the file

dataFlowIdstring

Advanced Replication dataflow identifier owning this file, when applicable

fileNamestring

File name derived from the flattened path

flattenedPathstring

Path of the file within the project's flattened file tree

versioninteger

Current version number of the file

phase'DRAFT' | 'APPROVED' | 'PENDING_DELETION'

Lifecycle phase of the file

mimeTypestring

MIME type of the file content

encodingstring

Encoding of the file content

sizeBytesinteger

Size of the file content in bytes

contentHashstring

Hash of the file content, used for change detection

entryFileboolean

Whether this file is the project's designated entry file

unchangedboolean

True when an update matched the stored file and no write was performed; omitted for read (list/get) and create/delete responses

Example response

{
  "fileId": "file-002",
  "fileName": "customers.dis.yaml",
  "flattenedPath": "sources/customers.dis.yaml",
  "version": 1,
  "mimeType": "application/yaml",
  "encoding": "utf-8",
  "sizeBytes": 512
}

Changes

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