I have a legacy Xivey (from Cosm) feed with old channels. I will create new feed and I want to migrate some old data to some new channels. How can I do that efficiently ? Thanks !
Else, I will work with scripts like this...
curl --request GET "http://api.xively.com/v2/feeds/#oldFeed#/datastreams/#oldChannel#.csv?key=#key#&start=2013-12-02&duration=24hours&interval=900&limit=100&interval_type=discrete" > tmp.csv
curl --request PUT --data-binary @tmp.csv --header "X-ApiKey: #key#" --verbose https://api.xively.com/v2/feeds/#newFeed#/datastreams/#newChannel#.csv
There is no supported way to do feed transfer. However, your method looks good to me.
However, you may want to add in some slight delays to avoid going over your rate limit and spamming Xively too hard.
来源:https://stackoverflow.com/questions/20326119/copy-range-of-historical-datapoints-between-xively-channels