Created
March 31, 2015 15:34
-
-
Save nferrari/a8d19b6e65c2f5c26941 to your computer and use it in GitHub Desktop.
alwaysdata API post domain record
This file contains hidden or 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
#!/usr/bin/python | |
import json | |
import requests | |
address = 'http://api.alwaysdata.com/v1/domain/record/' | |
credentials = ('APIKEY account=batman', '') | |
response = requests.post( | |
address, | |
auth=credentials, | |
verify=False, | |
data=json.dumps({ | |
'domain': 123, # Your domain ID | |
'type': 'A', | |
'name': 'fromapi', | |
'value': '1.1.1.1', | |
}) | |
) | |
print response.text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment