Postman Thingspeak Error 400 & Thinkspeak not updating the data

2 ビュー (過去 30 日間)
Syed Shah
Syed Shah 2021 年 3 月 23 日
Hi, I am trying to do the bulk update and using the following URL.
https://api.thingspeak.com/channels/channel_id/bulk_update.json
I send the following data
{
"write_api_key": "key",
"updates": [
{
"delta_t": 0,
"wavelengths": 5,
"amplitude": 10
}
]
}
When i write just once the data is written and i get the entry number in reply. Thingspeak still does not show the data. Although it shows that the no of entries have been updated.
https://api.thingspeak.com/update?api_key=key&wavelengths=30&amplitude=50
  2 件のコメント
Vinod
Vinod 2021 年 3 月 23 日
Your field names must be field1, field2 ,field3, field4, field5, filed6, field7 or field8. You can label them as you wish in the field name setting on the channel's settings page.
At the current time you can not use arbitrary names such as "wavelengths" and "amplitude" in the API request.
Syed Shah
Syed Shah 2021 年 3 月 24 日
Hi, Thank you for your reply.

サインインしてコメントする。

採用された回答

Christopher Stapels
Christopher Stapels 2021 年 3 月 23 日
編集済み: Christopher Stapels 2021 年 3 月 24 日
The bulk write API can be kind of tricky when it comes to syntax.
Follow the bulk write doc suggestions closely. There is a POSTMAN example there, look in the examples section.
For example, you cannot use your field names to update, you need to use field1 and field2 etc. That is also true for writing data at the regular update endpoint.
https://api.thingspeak.com/update?api_key=key&field1=30&field2=50
  2 件のコメント
Syed Shah
Syed Shah 2021 年 3 月 24 日
Hi, Thank you. The docs dont say specifically to use the fields. Using fields1,2 works.
Christopher Stapels
Christopher Stapels 2021 年 3 月 24 日
We will consider adding a note to the doc page. I appreciate your feedback.

サインインしてコメントする。

その他の回答 (0 件)

コミュニティ

その他の回答  ThingSpeak コミュニティ

カテゴリ

Help Center および File ExchangeRead Data from Channel についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by