Unified Project Lifecycle APIs

Create one project file

Creates one project file through the unified project API, for either an Advanced Replication (DSL) project or a Mainframe Replication pipeline.

Features:

  • content is always a Base64-encoded string, regardless of mimeType (for example application/yaml, application/x-yaml, or text/plain) — this keeps binary-safe transport consistent for every file type and avoids JSON-escaping issues with raw file text.
  • The response includes file metadata plus an ETag response header carrying a fingerprint hash of the created content; the same hash is also returned as contentHash in the body so callers that only inspect the JSON body (without reading headers) can still detect changes.
  • Fails with a conflict when a file already exists at the requested path — use the update endpoint instead, or move/rename the existing file first.
  • For Mainframe Replication, pass the pipeline identifier via pipelineId; Advanced Replication ignores pipelineId and instead uses the project's working set plus optional revisionNumber.

Use Cases:

  • VS Code extension creates a new DSL file within a project.
  • User seeds initial project files during onboarding or scaffolds a new pipeline definition.

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

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

Request

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

Path parameters

projectIdstring required

Unique identifier of the project

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 create

Request body

fileIdstring

Identifier of an existing file to update. Required for a batch-save item that updates a file; ignored by the single create endpoint, which always creates a new file.

flattenedPathstring

Path of the file within the project's flattened file tree. Required when creating a new file — via the single create endpoint, or as a batch-save item without fileId. Not required when fileId identifies an existing file to update.

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 when overwriting

expectedContentHashstring

Optional content-hash precondition, checked only when this item updates an existing file (fileId supplied). If it does not match the file's current stored hash, only this item fails; other items are unaffected. Ignored when creating a new file.

Example request

{
  "fileId": "file-002",
  "flattenedPath": "sources/customers.dis.yaml",
  "content": "c291cmNlOlxuICBjb25uZWN0aW9uOiBvcmFjbGVfc291cmNlXG4=",
  "mimeType": "application/yaml",
  "encoding": "utf-8"
}

Response

File created 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.