---
title: "Delete a DSL file from a revision"
method: DELETE
path: "/v1/integration/advanced-dsl/projects/{projectId}/revisions/{revisionId}/files/{fileId}"
tags: ["Advanced DSL Project Management"]
---

# Delete a DSL file from a revision

`DELETE /v1/integration/advanced-dsl/projects/{projectId}/revisions/{revisionId}/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}/revisions/{revisionId}/files/{fileId}`
- Auth: HTTP bearer

Removes a DSL file from the given revision. The deletion strategy is
**revision-count-aware**:

**Features**
- Physically deletes the file asset from the catalog if it belongs to only one revision.
- Removes only the revision-to-file relationship (soft unlink) if the file is shared
  across multiple revisions.

**Use Cases**
- Removing a file that was added only in this revision (physical delete).
- Unlinking a shared file from a specific revision without losing it from others.

**Scenarios**
- File included by exactly 1 revision → physical delete via catalog asset removal.
- File included by 2 or more revisions → relationship delete only; asset preserved.

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

## Path parameters

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

## Query parameters

- `target` string

## Response `200`

File deleted or unlinked successfully

- DeleteDslFileResponse: Response confirming the DSL file was deleted successfully
  - `fileId` string: Catalog asset ID of the deleted file
  - `name` string: The display name of the deleted file
  - `flattenedPath` string: The flattened path of the deleted file
  - `physicallyDeleted` boolean: True when the file asset was physically deleted; false when only the revision relationship was removed
  - `version` integer: The version of the file at the time of deletion
  - `timestamp` string, date-time: Server timestamp when the deletion was processed

## Other responses

- `400`: Missing or invalid parameters, including file-revision mismatch (error codes: DI-ADAPTER-VAL-0000, DI-ADAPTER-DSL-0024 DSL_FILE_NOT_ASSOCIATED_WITH_REVISION)
- `401`: Missing or invalid authentication token
- `403`: Insufficient permissions — requires `replication-pipeline::delete` or legacy `replication-pipeline::manage`
- `404`: Project or file not found (error codes: DI-ADAPTER-DSL-0011 DSL_PROJECT_NOT_FOUND, DI-ADAPTER-DSL-0019 DSL_FILE_NOT_FOUND)
- `500`: Internal server error — catalog delete or relationship removal failed (error codes: DI-ADAPTER-DSL-0021 DSL_FILE_DELETE_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)
