# Update Pipeline Yaml

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Update Pipeline Yaml"}
>
</Heading>

<MethodEndpoint
  method={"put"}
  path={"/api/v1/workspaces/{workspace_name}/pipelines/{pipeline_name}/yaml"}
  context={"endpoint"}
>
  
</MethodEndpoint>

:::caution deprecated

This endpoint has been deprecated and may be replaced or removed in future versions of the API.

:::

**Deprecated.** Updates the pipeline YAML file.

This endpoint is deprecated and will be removed in a future release.
To update a pipeline, use the pipeline versions API instead:
fetch the latest version, create a new version if the latest is not a draft,
then patch it via `PATCH /workspaces/{workspace_name}/pipelines/{pipeline_name}/versions/{version_id}`.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Name of the pipeline.","in":"path","name":"pipeline_name","required":true,"schema":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},{"description":"Type the name of the workspace.","in":"path","name":"workspace_name","required":true,"schema":{"description":"Type the name of the workspace.","title":"Workspace Name","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"properties":{"deepset_cloud_version":{"default":"v2","description":"The version of deepset the pipeline was created with.","title":"deepset Version","enum":["v2"],"type":"string"},"indexing_yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The deepset pipeline YAML configuration for indexing.","title":"Indexing YAML"},"query_yaml":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The deepset pipeline YAML configuration for querying.","title":"Query YAML"}},"title":"UpdatePipelineYAMLRequest","type":"object"}}},"required":true}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"content":{"application/json":{"schema":{"properties":{"name":{"description":"Name of the pipeline.","title":"Pipeline Name","type":"string"}},"required":["name"],"title":"PipelineName","type":"object"}}},"description":"The pipeline was successfully updated."},"400":{"description":"The pipeline was not updated because the pipeline configurations isn't valid."},"403":{"description":"You don't have permission to update this pipeline."},"404":{"description":"We couldn't find the pipeline you specified. Make sure the name is correct and the pipeline exists in the workspace you specified."},"409":{"description":"The pipeline was not updated because you can't update a deployed indexing pipeline."},"422":{"description":"The pipeline was not updated because the pipeline yaml can't be processed."},"424":{"description":"The pipeline was not updated because the request data is invalid."}}}
>
  
</StatusCodes>
