-
-
Save alecrajeev/c39ea1db8a47b338349023e8c4ed59ae to your computer and use it in GitHub Desktop.
Why is this not working?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
# add the Admin API access key where it says access key in the headers value | |
cc_api_url = 'https://api.cloudcheckr.com/api/account.json/add_account_v3' | |
headers = {'Content-Type': 'application/json', 'access_key': ''} | |
params = {'account_name': 'test_account'} | |
r = requests.post(cc_api_url, headers=headers, data=json.dumps(params)) | |
print r.json() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CloudCheckr requires the data to be json format, hence the json.dumps()