API datapoints/create_all.json returns all kinds of stuff just not what's documented

This:

[error] org.http4s.InvalidMessageBodyFailure: Invalid message body: Could not decode JSON: [
[error]   {
[error]     "timestamp" : 1573340399,
[error]     "value" : 8.0,
[error]     "comment" : "BeFocusedCSV",
[error]     "id" : "5dd18923bfec032102001fe6",
[error]     "updated_at" : 1574013219,
[error]     "requestid" : null,
[error]     "canonical" : "09 8 \"BeFocusedCSV\"",
[error]     "fulltext" : "2019-Nov-09 entered at 18:53 on 2019-Nov-17  via api",
[error]     "origin" : "api",
[error]     "daystamp" : "20191109",
[error]     "status" : "created"
[error]   },
[error]   {
[error]     "timestamp" : 1573426799,
[error]     "value" : 11.0,
[error]     "comment" : "BeFocusedCSV",
[error]     "id" : "5dd18923bfec032102001fe7",
[error]     "updated_at" : 1574013219,
[error]     "requestid" : null,
[error]     "canonical" : "10 11 \"BeFocusedCSV\"",
[error]     "fulltext" : "2019-Nov-10 entered at 18:53 on 2019-Nov-17  via api",
[error]     "origin" : "api",
[error]     "daystamp" : "20191110",
[error]     "status" : "created"
[error]   },
[error]   {
[error]     "timestamp" : 1573513199,
[error]     "value" : 5.0,
[error]     "comment" : "BeFocusedCSV",
[error]     "id" : "5dd18923bfec032102001fe8",
[error]     "updated_at" : 1574013219,
[error]     "requestid" : null,
[error]     "canonical" : "11 5 \"BeFocusedCSV\"",
[error]     "fulltext" : "2019-Nov-11 entered at 18:53 on 2019-Nov-17  via api",
[error]     "origin" : "api",
[error]     "daystamp" : "20191111",
[error]     "status" : "created"
[error]   }
[error] ]

is clearly not just the last Datapoint created as stated here:

http://api.beeminder.com/#postdatas

Which is arguably more useful than just returning the last data point created.
How about removing the return type altogether from the docs? It’s clearly wrong and misleading.

Especially since when you submit an empty list, you get this back:

[error] org.http4s.InvalidMessageBodyFailure: Invalid message body: Could not decode JSON: {
[error]   "errors" : [
[error]   ],
[error]   "successes" : [
[error]   ]
[error] }
1 Like

Fixed! Thank you!

http://beeminder.com/changelog#3207

1 Like