---
title: "Update a DSL file"
method: PUT
path: "/v1/integration/advanced-dsl/projects/{projectId}/files/{fileId}"
tags: ["Advanced DSL Project Management"]
---

# Update a DSL file

`PUT /v1/integration/advanced-dsl/projects/{projectId}/files/{fileId}`

## Request

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

Updates the content and metadata of an existing DSL file asset within a project
using a multipart/form-data upload.

**Features**
- Updates content, content-hash, size, MIME type, encoding, and phase.
- Ensures the file is linked to a revision via `Includes` relationship after save.
- Accepts optional `revisionNumber`; when omitted, links against the latest project revision.

**Use Cases**
- Persisting a modified DSL file during a push operation.

**Scenarios**
- File exists → patch content, hash, size, MIME type, encoding, and phase.
- File not yet linked to selected/latest revision → create missing `Includes` relationship.
- File already linked to selected/latest revision → no duplicate relationship is created.

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

## Path parameters

- `projectId` string, required
- `fileId` string, required

## Query parameters

- `mimeType` string
- `encoding` string
- `phase` string
- `version` integer
- `flattenedPath` string
- `revisionNumber` integer

## Response `201`

File updated successfully

- SaveDslFileResponse: Response confirming the DSL file was saved successfully
  - `fileId` string: Catalog asset ID of the saved file
  - `name` string: The base name of the saved file
  - `flattenedPath` string: The flattened path of the saved file
  - `phase` string: The current lifecycle phase of the file after save
  - `version` integer: The version of the file after save
  - `timestamp` string, date-time: Server timestamp when the save was processed

## Other responses

- `400`: Invalid request — missing file part, unreadable content, or constraint violation
- `401`: Missing or invalid authentication token
- `403`: Insufficient permissions — requires `replication-pipeline::update` or legacy `replication-pipeline::manage`
- `404`: Project not found (error code: DI-ADAPTER-DSL-0011 DSL_PROJECT_NOT_FOUND)
- `409`: Version conflict for existing file (error code: DI-ADAPTER-DSL-0025 DSL_FILE_VERSION_CONFLICT)
- `500`: Internal server error — catalog asset patch, create, or retrieval failed (error codes: DI-ADAPTER-DSL-0020 DSL_FILE_SAVE_FAILED)

---

[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)
