Skip to content

Instantly share code, notes, and snippets.

@casperlehmann
Created January 31, 2019 09:38
Show Gist options
  • Save casperlehmann/e41701e8a87d39c990fa913191f5c6ab to your computer and use it in GitHub Desktop.
Save casperlehmann/e41701e8a87d39c990fa913191f5c6ab to your computer and use it in GitHub Desktop.
TOKEN = 'XXX'
REPORT_ID = 'YYY'
GROUP_ID = 'ZZZ'
delete_url = f'https://api.powerbi.com/v1.0/myorg/groups/{GROUP_ID}/reports/{REPORT_ID}'
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + TOKEN
}
res = requests.post(delete_url, headers=headers)
print ('Response:', res.status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment