Hi, this feels like I must be missing something obvious but I can’t figure it out.
I’m trying to create multiple datapoints through the Beeminder API, using the python requests library.
datapoint = {"value": 100, "comment": "test", "daystamp": "20210203"}
payload = {"auth_token": XXXX, "datapoints":[datapoint]}
resp = requests.post(URL, json=payload)
This gives a 422 with the response: '{"errors":{"value":["can\'t be blank","is not a number"]}}'
.
However using the same data to create a single datapoint works just fine.
resp2=requests.post(URL, json={"auth_token": XXXX, **datapoint})
Any thoughts on what I might be doing wrong?