接口调用请求说明
- 方式:HTTP GET
- 内容:http://api.ubibot.cn/channels/CHANNEL_ID/feeds 或 http://api.ubibot.cn/channels/CHANNEL_ID/feeds.csv(导出CSV格式的空间数据)
- (注:将CHANNEL_ID替换为您的空间编号)
参数说明
参数 | 是否必须 | 说明 |
api_key | 必须 | 指定空间的读写密钥 (公开空间不需要密钥) ,与token_id(string)二选一 |
token_id(string) | 必须 | 通过登录接口获取,与api_key二选一 |
results (integer) | 可选 | 需要查询的条目数, 最多8000 (可选) |
start (datetime) | 可选 | 检索开始时间,格式 YYYY-MM-DD%20HH:NN:SS |
end (datetime) | 可选 | 检索结束时间,格式 YYYY-MM-DD%20HH:NN:SS |
timezone (string) | 可选 | 检索的时区 |
min (decimal) | 可选 | 返回数据的最小值 |
max (decimal) | 可选 | 返回数据的最大值 |
callback (string) | 可选 | JSONP 跨域请求的方法名 |
返回说明
正常情况下,平台会返回下述JSON数据包:
{“result”:”success”,”server_time”:”2017-09-04T06:31:04Z”,”is_truncated”:false,”start”:null,”end”:”2017-09-04T06:31:04+00:00″,”sum”:null,”average”:null,”min”:null,”max”:null,”timezone”:”Asia/Shanghai”,”num_records”:4036,”results”:4000,”channel”:{“channel_id”:”395″,”name”:”\u8bbe\u5907 395″,”field1″:”\u6e29\u5ea6″,”field2″:”\u6e7f\u5ea6″,”field3″:”\u5149\u7167″,”field4″:”\u7535\u91cf”,”field5″:”\u4fe1\u53f7\u5f3a\u5ea6″,”field6″:”\u52a0\u901f\u5ea6″,”field7″:”\u6572\u51fb”,”field8″:”\u5916\u63a5\u6e29\u5ea6″,”field9″:”\u95e8\u78c1″,”field10″:null,”latitude”:null,”longitude”:null,”elevation”:null,”created_at”:”2017-07-11T03:17:44Z”,”public_flag”:”false”,”user_id”:”3E9B0F4C-3564-41EF-94CF-0DB568577DE1″,”last_entry_date”:”2017-07-14T06:41:27Z”,”last_entry_id”:”15403″,”vconfig”:””,”username”:”mob_b8f25b5631b434ab9ab69ac5126589f5″},”feeds”:[{“created_at”:”2017-07-14T14:41:24+08:00″,”field5″:-49,”field1″:null,”field2″:null,”field3″:null,”field4″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15403},{“created_at”:”2017-07-14T14:41:04+08:00″,”field1″:26.220337,”field2″:57,”field3″:0.4,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15402},{“created_at”:”2017-07-14T14:40:04+08:00″,”field1″:26.134888,”field2″:57,”field3″:0.28,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15399},{“created_at”:”2017-07-14T14:39:56+08:00″,”field8″:25.6875,”field1″:null,”field2″:null,”field3″:null,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field9″:null,”entry_id”:15396},{“created_at”:”2017-07-14T14:39:04+08:00″,”field1″:26.036087,”field2″:56,”field3″:0.35,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15395},{“created_at”:”2017-07-14T14:38:04+08:00″,”field2″:52,”field3″:171.519989,”field1″:null,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15392},{“created_at”:”2017-07-14T14:38:03+08:00″,”field1″:26.009384,”field2″:null,”field3″:null,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15390},{“created_at”:”2017-07-14T14:37:03+08:00″,”field1″:26.06546,”field2″:52,”field3″:183.599991,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:15389}, … … {“created_at”:”2017-07-12T13:00:55+08:00″,”field1″:32.845428,”field2″:63,”field3″:488.799988,”field4″:null,”field5″:null,”field6″:null,”field7″:null,”field8″:null,”field9″:null,”entry_id”:5337}]} |