# Change Pipeline State

```
POST /api/v1/change_pipeline_state
```

You can either start/resume a pipeline by setting `state` to `"running"` or pause it by setting `state` to `"paused"`. You can also update the pipeline to a specific configuration by providing the `deployed_configuration_id`.

## **Request Body (JSON):**

```json
{
  "virtual_cluster_id": "vci_xxx",
  "pipeline_id": "pipeline-xyz",
  "desired_state": "running" // or "paused" (optional)
  "deployed_configuration_id": "config-123" // (optional)
}
```

### **CURL Example:**

```bash
curl https://api.warpstream.com/api/v1/change_pipeline_state \
-H 'warpstream-api-key: XXXXXXXXXX' \
-H 'Content-Type: application/json' \
-X POST \
-d '{"virtual_cluster_id": "vci_xxx", "pipeline_id": "pipeline-xyz", "desired_state": "running"}' 
```

## **Response Body (JSON):**

```json
{
  // Empty JSON object (or a success status code)
}
```
