Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import sevenbridges as sbg
c = sbg.Config(profile='cavatica')
api = sbg.Api(config=c)
bg = api.billing_groups.get(id='14bc19f2-6a6a-4a44-bb07-f86020dad9c0')
breakdown = bg.breakdown()
for project_breakdown in breakdown.project_breakdown:
project_id_parsed = (project_breakdown.href.split("/")[-2:])
project_id = "/".join(project_id_parsed)
print(project_id)
# It prints
# milan_kovacevic/gtex-cavatica
# milan_kovacevic/canine-analysis-test
# vesna_pajic/debugging
# mmattioni/shiny-demo
## Note:
## it returns only the projects with charges, and ignore the one with no charges associated with the Billing Group.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.