# Problems with data submission using create\_all.json method from API

**URL:** <https://forum.beeminder.com/t/problems-with-data-submission-using-create-all-json-method-from-api/197>\
**Category:** Bugabee\
**Created:** [November 1, 2014, 12:39pm UTC](https://forum.beeminder.com/t/problems-with-data-submission-using-create-all-json-method-from-api/197 "2014-11-01T12:39:28Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![davitenio](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/davitenio/32/62_2.png) [@davitenio](https://forum.beeminder.com/u/davitenio)\
**Post date:** [November 1, 2014, 12:39pm UTC](https://forum.beeminder.com/t/problems-with-data-submission-using-create-all-json-method-from-api/197/1 "2014-11-01T12:39:29Z")

</div>

I have been using some Python scripts for some time now to submit data points to a couple of my goals. Since yesterday they are no longer working. The issue seems to be with the create\_all methods of the Beeminder API. Instead of posting my scripts, which contain a lot of irrelevant stuff, I’ll post a minimum example that I think should work, but doesn’t. The code is the following:

```
#!/usr/bin/python3

from time import time
import json
import requests

API_URL = 'https://www.beeminder.com/api/v1/'
auth_token = "THEAUTHTOKEN" # my auth token
user = "davitenio"
goal = "totalpomodoros"

timestamp_now = round(time())
data = [
        {
            'timestamp': timestamp_now,
            'value': 42,
            'comment': 'this is a test'
        }
]

print("Submitting the following data to {}: {}".format(goal, data))

path = 'users/{}/goals/{}/datapoints/create_all.json'.format(user, goal)
datapoints = json.dumps(data)
args = {'auth_token': auth_token, 'datapoints': datapoints}
response = requests.post(API_URL + path, params=args)
print(response.json())

```

When I run this script, it prints the following:

```
Submitting the following data to totalpomodoros: [{'comment': 'this is a test', 'timestamp': 1414842516, 'value': 42}]
{'successes': [], 'errors': ['{"comment":"this is a test","timestamp":1414842516,"value":42}']}

```

As can be seen, I am getting the submitted data listed under errors as a response. Moreover, my goal is not updated. Shouldn’t the above code work and successfully submit data?

---

_[View the full topic](https://forum.beeminder.com/t/problems-with-data-submission-using-create-all-json-method-from-api/197)._
