フィードを更新 (新しい値を設定) してからフィードを読み取ると、返されるデータに前回の更新が含まれていない場合があることに気付きました。Xively がキャッシュされた応答を返しているかのようです。最終的に (5 分ほど後)、要求によって新しい値が返されます。
これは開発モードのデバイスです。更新直後に、デバイスの Xively ステータス ページに反映された新しい値を確認できます。また、データが古くなったリクエストが Xively リクエスト ログに表示されないことにも気付きました。リクエストを送信してから 5 分ほど経過した後、古いレスポンスを取得すると、リクエスト ログにリクエストが表示され、最新のレスポンスが返されます。
次のようにフィードを更新します: curl -X PUT -d@feedupdate.json -H X-ApiKey:my_key http://api.xively.com/v2/feeds/feed_id.json
feedupdate.json の内容は次のとおりです。
{ "version": "1.0.0", "datastreams": [ { "id": "stream_id", "current_value": "202" } ] }
そして、次のようにフィードのステータスをリクエストします。
curl -o feedrange.json -H Cache-control:no-cache -H Pragma:no-cache -H X-ApiKey:my_key http://api.xively.com/v2/feeds/feed_id.xml?start=2014 -01-13T10:00:00Z
ティア。