I'm trying to communicate with datadog's api using the PUT method but failing with a "400" response. I've looked into the documentation and I'm confident my headers are set up correctly and access keys have been specified. Below is the function I'm working with:
def editMonitor(monitor_Data):
api_url = 'https://api.datadoghq.com/api/v1/monitor/' + str(monitor_Data['id'])
response = requests.put(api_url, monitor_Data, headers=headers)
print(response)
if response.status_code == 200:
return json.loads(response.content.decode('utf-8'))
else:
return None
Below is what the header is made of:
headers = {'Content-Type': 'application/json',
'DD-API-KEY': '**********************',
'DD-APPLICATION-KEY': '***********************'
}
Other articles I've seen so far don't seem to answer my question.
