null response for status channel

max hegi on 8 Jul 2022
Latest activity Reply by Thomas Smart on 11 Jul 2022

Hi,
response
{"created_at":"2022-07-08T01:17:08Z","entry_id":16662856,"status":null}
it's normal, solution?
thanks
Christopher Stapels
Christopher Stapels on 9 Jul 2022

There are no issues with the api as far as I am aware. Your response for the last entry is null probably because there’s no data in that field. I suggest you try writing to the field and then reading from it once you know there’s data in there. Remember if you write to a different field, you will have a no entry in all the other fields.

if true
  % code
end
Thomas Smart
Thomas Smart on 9 Jul 2022
I'm having issues with the json API.
This is what I'm trying to send
{'Content-Type': 'application/json'} payload= {"write_api_key": "api_key", "updates": [{"created_at": 1657405561.3865707, "field1": 24.42, "field2": 90, "field3": 47.19, "field4": 1206.83, "field5": 2.33, "field6": 3.33, "field7": 109.17, "field8": 35}]}
sending it to
"https://api.thingspeak.com/channels/" + __channel_id + "/bulk_update.json"
I get this response
{"status":"400","error":{"error_code":"error_bad_request","message":"Bad Request","details":"The request cannot be fulfilled due to bad syntax."}}
The same code was working 2 days ago and suddenly stopped working. I have no idea what changed.
Christopher Stapels
Christopher Stapels on 11 Jul 2022
One thing I would check for is duplicate entries in your channel (these are not allowed)
How are you generating the created at stamp? Im not sure what format that is.
Thomas Smart
Thomas Smart on 11 Jul 2022
the timestamp is from python. It is unique and since the issue it has resolved itself which makes me believe there was some issue on the api end either way its resolved.
Thomas Smart
Thomas Smart on 9 Jul 2022
I believe they are having an issue with the json API. I had code working perfectly to upload data just randomly stop working and return a 400 "The request cannot b3e fulfilled due to bad syntax."
This code worked until yesterday then I tried fixing it for 4 hours yesterday with no luck. Your indication that the json read is messing up makes me believe it may be an issue with the API.