How to know if project has active bundle in automation
arielma2304
Registered Posts: 47 ✭✭✭✭
Hi
Is there a way go get thought API f project is active or not in automation? and if yes, can we tell which bundle is active now?
Tagged:
Best Answer
-
Hi,
With the REST API, you can call
public/api/projects/{projectKey}
on an automation node.This will provide you with the active bundle if some - "activeBundleState": { "bundleId": "BUNDLE_ID", "activatedOn": "2021-01-27T10:49:21.926+0100" }
And for the Python API you have to use the
<a href="https://doc.dataiku.com/dss/latest/python-api/client.html?highlight=list_projects#dataikuapi.DSSClient.list_projects" target="_self">list_projects()</a>
method:active_bundle = "" for project in client.list_projects(): if project['projectKey'] == "YOUR_PROJECT_KEY": if 'activeBundleState' in project: active_bundle = project['activeBundleState'] break
Hope it helps,
David