简体   繁体   中英

Copy range of historical datapoints between xively channels

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM