Skip to content

Instantly share code, notes, and snippets.

@briglx
Created October 16, 2017 20:12
Show Gist options
  • Save briglx/9c7585419bdf4138b76d9fafe9c64dce to your computer and use it in GitHub Desktop.
Save briglx/9c7585419bdf4138b76d9fafe9c64dce to your computer and use it in GitHub Desktop.
Fetch Azure Monthly Report
#!/bin/bash
# Replace the placeholders with your access token and ea number
# Replace the date with the month you are interested in YYYY-MM
wget -d --header="authorization: bearer REPLACE_WITH_ACCESS_TOKEN" --header="api-version: 1.0" -O usagereport.csv "https://ea.azure.com/rest/REPLACE_WITH_EA_NUMBER/usage-report?month=2017-10&type=detail&fmt=Csv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment