---
title: "Update a pipeline"
---

> Documentation Index
> Fetch the complete documentation index at: https://www.arroyo.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a pipeline

Path: Arroyo REST API › pipelines

`PATCH /v1/pipelines/{id}`

URL: `http://localhost:5115/api/v1/pipelines/{id}`

## Path parameters

- `id` (`patch_pipeline.path.id`; string, required) — Pipeline id

## Request body

_Required._

- `checkpoint_interval_micros` (`patch_pipeline.checkpoint_interval_micros`; integer, optional, nullable)
  - format: `int64` · minimum: `0`
- `env_vars` (`patch_pipeline.env_vars`; map of string, optional, nullable) — Per-job environment variables forwarded to workers.
- `parallelism` (`patch_pipeline.parallelism`; integer, optional, nullable)
  - format: `int64` · minimum: `0`
- `scheduler_config` (`patch_pipeline.scheduler_config`; unknown, optional, nullable) — Per-job scheduler configuration overlay. The shape mirrors the controller's global scheduler config (e.g. the `kubernetes-scheduler.*` block) and is merged on top of it at scheduling time. An omitted field, `null`, or an empty object all mean "use the controller's global scheduler config unchanged".
- `stop` (`patch_pipeline.stop`; string, optional, nullable)
  - one of `"none"`, `"checkpoint"`, `"graceful"`, `"immediate"`, `"force"`

## Example request

```json
{
  "checkpoint_interval_micros": 0,
  "env_vars": {
    "property1": "string",
    "property2": "string"
  },
  "parallelism": 0,
  "scheduler_config": null,
  "stop": "none"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'http://localhost:5115/api/v1/pipelines/<id>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "checkpoint_interval_micros": 0,
  "env_vars": {
    "property1": "string",
    "property2": "string"
  },
  "parallelism": 0,
  "scheduler_config": null,
  "stop": "none"
}
'
```

### TypeScript

```typescript
const url = 'http://localhost:5115/api/v1/pipelines/<id>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    checkpoint_interval_micros: 0,
    env_vars: {property1: 'string', property2: 'string'},
    parallelism: 0,
    scheduler_config: null,
    stop: 'none'
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "http://localhost:5115/api/v1/pipelines/<id>"

payload = {
    "checkpoint_interval_micros": 0,
    "env_vars": {
        "property1": "string",
        "property2": "string"
    },
    "parallelism": 0,
    "scheduler_config": None,
    "stop": "none"
}
headers = {"Content-Type": "application/json"}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Updated pipeline

#### Example

```json
{
  "action": "none",
  "action_in_progress": true,
  "action_text": "string",
  "checkpoint_interval_micros": 0,
  "created_at": 0,
  "graph": {
    "edges": [
      {
        "dest_id": 0,
        "edge_type": "string",
        "key_type": "string",
        "src_id": 0,
        "value_type": "string"
      }
    ],
    "nodes": [
      {
        "description": "string",
        "node_id": 0,
        "operator": "string",
        "parallelism": 0
      }
    ]
  },
  "id": "string",
  "name": "string",
  "preview": true,
  "query": "string",
  "state_url": "string",
  "stop": "none",
  "tags": {
    "property1": "string",
    "property2": "string"
  },
  "udfs": [
    {
      "definition": "string",
      "language": "python"
    }
  ]
}
```

- `action_in_progress` (`patch_pipeline.response.200.action_in_progress`; boolean, required)
- `action_text` (`patch_pipeline.response.200.action_text`; string, required)
- `checkpoint_interval_micros` (`patch_pipeline.response.200.checkpoint_interval_micros`; integer, required)
  - format: `int64` · minimum: `0`
- `created_at` (`patch_pipeline.response.200.created_at`; integer, required)
  - format: `int64` · minimum: `0`
- `graph` (`patch_pipeline.response.200.graph`; object, required)
  - `edges` (`patch_pipeline.response.200.graph.edges`; array of object, required)
    - `dest_id` (`patch_pipeline.response.200.graph.edges.dest_id`; integer, required)
      - format: `int32` · minimum: `0`
    - `edge_type` (`patch_pipeline.response.200.graph.edges.edge_type`; string, required)
    - `key_type` (`patch_pipeline.response.200.graph.edges.key_type`; string, required)
    - `src_id` (`patch_pipeline.response.200.graph.edges.src_id`; integer, required)
      - format: `int32` · minimum: `0`
    - `value_type` (`patch_pipeline.response.200.graph.edges.value_type`; string, required)
  - `nodes` (`patch_pipeline.response.200.graph.nodes`; array of object, required)
    - `description` (`patch_pipeline.response.200.graph.nodes.description`; string, required)
    - `node_id` (`patch_pipeline.response.200.graph.nodes.node_id`; integer, required)
      - format: `int32` · minimum: `0`
    - `operator` (`patch_pipeline.response.200.graph.nodes.operator`; string, required)
    - `parallelism` (`patch_pipeline.response.200.graph.nodes.parallelism`; integer, required)
      - format: `int32` · minimum: `0`
- `id` (`patch_pipeline.response.200.id`; string, required)
- `name` (`patch_pipeline.response.200.name`; string, required)
- `preview` (`patch_pipeline.response.200.preview`; boolean, required)
- `query` (`patch_pipeline.response.200.query`; string, required)
- `stop` (`patch_pipeline.response.200.stop`; string, required)
  - one of `"none"`, `"checkpoint"`, `"graceful"`, `"immediate"`, `"force"`
- `tags` (`patch_pipeline.response.200.tags`; map of string, required) — User-defined key/value tags associated with the pipeline.
- `udfs` (`patch_pipeline.response.200.udfs`; array of object, required)
  - `definition` (`patch_pipeline.response.200.udfs.definition`; string, required)
  - `language` (`patch_pipeline.response.200.udfs.language`; string, optional)
    - one of `"python"`, `"rust"`
- `action` (`patch_pipeline.response.200.action`; string, optional, nullable)
  - one of `"none"`, `"checkpoint"`, `"graceful"`, `"immediate"`, `"force"`
- `state_url` (`patch_pipeline.response.200.state_url`; string, optional, nullable) — Optional URL pointing to the state the pipeline was started from.


Source: https://www.arroyo.dev/docs/api/patch-pipeline/index.md
