Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Update a Pipeline with the REST API

Change a pipeline's settings or its YAML configuration using the REST API.


About This Task​

You can edit a development pipeline while it remains deployed. Any changes you make create a new, undeployed version of the pipeline. You can't edit production pipelines. You must change the pipeline's service level first.

Prerequisites​

Update Pipeline Settings​

Use the Update Pipeline endpoint to change pipeline settings, such as name or service level, without changing the YAML configuration.

Copy this code and modify it as needed:

curl --request PATCH \
--url https://api.cloud.deepset.ai/api/v1/workspaces/<YOUR_WORKSPACE>/pipelines/<PIPELINE_NAME> \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: Bearer <YOUR_API_KEY>' \
--data '
{
"name": "new_pipeline_name",
"service_level": "DEVELOPMENT",
"status": 1
}
'

Update the Pipeline YAML Configuration​

To update the pipeline YAML configuration, use the pipeline versions API:

  1. Fetch the latest version using Get Query Pipeline Version.
  2. Check whether the version you fetched is a draft (is_draft is true). A draft usually exists because publishing or finalizing a version always leaves one behind.
    • If it's a draft, go to the next step and patch it.
    • If it's not a draft, create a new draft version with Create Query Pipeline Version. If a draft already exists, it's automatically finalized and a new draft is created. The new draft doesn't copy the version description, which stays with the finalized version. If another user has locked the existing draft, the request returns a 409 Conflict error. Wait for the lock to expire and try again.
  3. Update the pipeline configuration using Patch Query Pipeline Version. To publish the draft, set is_draft to false. The same request also creates a new draft with the same content. Don't send a separate request to create a draft: it creates an extra, duplicate version.

What To Do Next​

Deploy the pipeline to use the updated version for search.