Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
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?
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 list_projects()
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
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 list_projects()
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