Here is a sample of my command:
Code: Select all
curl -H "Content-Type: application/json" -d @batch.json -H "X-AIO-Key: {x-aio-key}" https://io.adafruit.com/api/v2/tannkar/feeds/sample.006/data/batch
Code: Select all
[{
"value": 112,
"created_at": "2019-08-01T06:00:00Z"
},
{
"value": 112.4,
"created_at": "2019-08-01T18:00:00Z"
}]
FYI:
The following syntax for a single record is accepted successfully using a Mac:
Code: Select all
curl -H "Content-Type: application/json" -d '{"value":173,"created_at":"2019-08-10T18:0000-06:00","lat":44.940591, "lon":"-102.455239"}' -H "X-AIO-Key: {x-aio-key]" https://io.adafruit.com/api/v2/tannkar/feeds/sample.392/data
Code: Select all
curl -H "Content-Type: application/json" -d "{\"value\":173,\"created_at\":\"2019-08-10T18:0000-06:00\",\"lat\":44.940591, \"lon\":\"-102.455239\"}" -H "X-AIO-Key: {x-aio-key]" https://io.adafruit.com/api/v2/tannkar/feeds/sample.392/data