請求方式:POST
URL:http://api.onenet.hk.chinamobile.com/bindata
參數名稱 | 格式 | 是否必須 | 說明 |
---|---|---|---|
device_id | string | 是 | 數據所屬設備 |
datastream_id | string | 是 | 該數據所屬已經存在的數據流或者數據流範本名稱 |
desc | string | 否 | 檔描述 |
普通二進位數據、檔、圖像等(**最大限制為800k**)
參數名稱 | 格式 | 說明 |
---|---|---|
errno | int | 調用錯誤碼,為0表示調用成功 |
error | string | 錯誤描述,為“succ”表示調用成功 |
data | json | 介面調用成功之後返回的數據相關信息,見data描述表 |
data描述表
參數名稱 | 格式 | 說明 |
---|---|---|
index | string | 二進位數據索引號,可以作為參數用於獲取文件API |
POST http://api.onenet.hk.chinamobile.com/bindata?device_id=8029377&datastream_id=bin&desc=testfile HTTP/1.1
<file>
{
"errno": 0,
"error": "succ",
"data": {
"index": "3491506_1475204886914_bin"
}
}