#Get Record by UUID getRecordURL = f"https://edge01.mydomain.com/api/bind/record/getRecord/{record_to_update}" newTXTvalue = '"abcdefg1234567"' myonerecord = requests.get(getRecordURL, auth=(api_key, api_secret)) myonerecord_response = json.loads(myonerecord.text) #Set new Value myonerecord_response["record"]["value"] = f"{newTXTvalue}" #Pass the same json back with the value changed. postRecordURL = f"https://edge01.mydomain.com/api/bind/record/setRecord/{record_to_update}" myupdaterecord = requests.request("POST", postRecordURL, auth=(api_key, api_secret), json=myonerecord_response)
b'{"result":"failed","validations":{"record.domain":"option not in list","record.type":"option not in list"}}'
myupdaterecord = requests.request("POST", postRecordURL, auth=(api_key, api_secret), json=json.dumps(myonerecord_response))
print(myupdaterecord.content)
b'{"result":"failed"}'