Generate IAM Token export IBMCLOUD_API_KEY=<your IBM cloud API key> iam_token=`curl -s -k -X POST --header "Content-Type: application/x-www-form-urlencoded" --header "Accept: application/json" --data-urlencode "grant_ty pe=urn:ibm:params:oauth:grant-type:apikey" --data-urlencode "apikey=${IBMCLOUD_API_KEY}" "https://iam.cloud.ibm.com/identity/token" | jq -r '(.token_type + " " + .access _token)'` Pull usage for month in CSV format curl -s -X GET "https://billing.cloud.ibm.com/v4/accounts/${ACCOUNT_ID}/resource_instances/usage/2020-08?format=csv" -H "Authorization: ${iam_token}"