> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a Pipeline

> Delete a pipeline by ID or name, with soft/hard delete options

# Delete a Pipeline

Delete a pipeline by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

## Delete by ID

**id** `string` *required*

UUID of the pipeline to delete.

**recursive** `boolean` (default: false)

Recursively delete child entities.

**hardDelete** `boolean` (default: false)

Permanently delete the pipeline. If `false`, the pipeline is soft-deleted and can be restored.

## Delete by Name

Use `DELETE /v1/pipelines/name/{fqn}` to delete by fully qualified name.

**fqn** `string` *required*

Fully qualified name of the pipeline, for example `sample_airflow.dbt_analytics_customers`.

**recursive** `boolean` (default: false)

Recursively delete child entities.

**hardDelete** `boolean` (default: false)

Permanently delete the pipeline.

## Restore a Soft-Deleted Pipeline

Use `PUT /v1/pipelines/restore` to restore a soft-deleted pipeline.

**id** `string` *required*

UUID of the soft-deleted pipeline to restore.

```python DELETE /v1/pipelines/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import Pipelines

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Pipelines.delete("538faa63-d204-46ff-aead-d158d0401cac")

# Hard delete
Pipelines.delete(
    "538faa63-d204-46ff-aead-d158d0401cac",
    hard_delete=True
)

# Delete by name
pipeline = Pipelines.retrieve_by_name("sample_airflow.dbt_analytics_customers")
Pipelines.delete(pipeline.id)

# Delete by name with options
pipeline = Pipelines.retrieve_by_name("sample_airflow.dbt_analytics_customers")
Pipelines.delete(
    pipeline.id,
    hard_delete=True
)

# Restore a soft-deleted pipeline
Pipelines.restore("538faa63-d204-46ff-aead-d158d0401cac")
```

```java DELETE /v1/pipelines/{id} theme={null}
import java.util.Map;
import org.openmetadata.schema.entity.data.Pipeline;

// client is an initialized OpenMetadataClient.

// Soft delete
client.pipelines().delete("538faa63-d204-46ff-aead-d158d0401cac");

// Hard delete
client.pipelines().delete("538faa63-d204-46ff-aead-d158d0401cac", Map.of("hardDelete", "true"));

// Delete by name (look up the ID first)
Pipeline pipeline = client.pipelines().getByName("sample_airflow.dbt_analytics_customers");
client.pipelines().delete(pipeline.getId());

// Restore
client.pipelines().restore("538faa63-d204-46ff-aead-d158d0401cac");
```

```bash DELETE /v1/pipelines/{id} theme={null}
# Soft delete by ID
curl -X DELETE "{base_url}/api/v1/pipelines/538faa63-d204-46ff-aead-d158d0401cac" \
  -H "Authorization: Bearer {access_token}"

# Hard delete
curl -X DELETE "{base_url}/api/v1/pipelines/538faa63-d204-46ff-aead-d158d0401cac?hardDelete=true" \
  -H "Authorization: Bearer {access_token}"

# Delete by name
curl -X DELETE "{base_url}/api/v1/pipelines/name/sample_airflow.dbt_analytics_customers" \
  -H "Authorization: Bearer {access_token}"

# Restore soft-deleted pipeline
curl -X PUT "{base_url}/api/v1/pipelines/restore" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{"id": "538faa63-d204-46ff-aead-d158d0401cac"}'
```

```json Response (Soft Delete) theme={null}
{
  "id": "538faa63-d204-46ff-aead-d158d0401cac",
  "name": "dbt_analytics_customers",
  "displayName": "DBT Customer Analytics",
  "fullyQualifiedName": "sample_airflow.dbt_analytics_customers",
  "version": 0.2,
  "updatedAt": 1769982668397,
  "updatedBy": "admin",
  "service": {
    "id": "daa58a49-df05-48a3-a417-45dfd12eacf5",
    "type": "pipelineService",
    "name": "sample_airflow",
    "fullyQualifiedName": "sample_airflow"
  },
  "serviceType": "DBTCloud",
  "deleted": true,
  "owners": [],
  "tags": [],
  "followers": [],
  "votes": {
    "upVotes": 0,
    "downVotes": 0
  },
  "domains": []
}
```

***

## Returns

Soft delete returns the pipeline object with `deleted: true`. Hard delete returns no content (204). Restore returns the restored pipeline object.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to delete this pipeline |
| `404` | `NOT_FOUND` | Pipeline with given ID or FQN does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.