Discard draft changes and reset Pipeline.steps to a published version’s steps.
Python
import requests url = "https://www.datalab.to/api/v1/pipelines/{pipeline_id}/discard" payload = { "version": 2 } headers = { "X-API-Key": "<api-key>", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.text)
{ "id": 123, "pipeline_id": "<string>", "name": "<string>", "steps": [ "<unknown>" ], "is_saved": true, "archived": true, "active_version": 123, "created": "2023-11-07T05:31:56Z", "updated": "2023-11-07T05:31:56Z" }
Version to revert to. If omitted, reverts to the active published version.
x >= 1
Successful Response
Was this page helpful?