I'm currently working on getting the licensing for all our clients and have successfully managed to output to print in the console.
I cannot for the life of me figure out how to output to a csv with the structure like
- Organization
- Status
- Expiration Date
Any help would be appreciated.
for z in get_orgs_json:
org_id = z['id']
get_license_url = base_url + 'organizations/{}/licenseState'.format(org_id)
get_license_response = requests.get(get_license_url, headers=headers)
get_license_json = get_license_response.json()
print('Organization ' + (z['name']) + ' Current Status ' + (get_license_json['status']) + ' Expiration Date ' + (get_license_json['expirationDate']))