OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
API
API Usage API List SDK MQTT LwM2M EDP Modbus TCP
HTTP Push MQ
Other Service Common Question

# Upload File Request Method: POST

URL:http://api.heclouds.com/bindata

url Parameter

Parameter Name Format Required Description
device_id string yes device to which data belongs
datastream_id string yes name of existing datastream or datastream template to which the data belongs
desc string no file description

http body Content

ordinary binary data, file, image, etc. (**Maximum limit is 800k**)

Return Parameter

Parameter Name Format Description
errno int code for call error , 0 indicates call is successful
error string error description, "succ" indicates call is successful
data json data related information returned after successful interface call, see data description table
data Description Table
Parameter Name Format Description
index string binary data index number, which can be used as a parameter to get file API

Example of Request

POST http://api.heclouds.com/bindata?device_id=8029377&datastream_id=bin&desc=testfile HTTP/1.1

<file>

Example of Request Return

{
    "errno": 0,
    "error": "succ",
    "data": {
        "index": "3491506_1475204886914_bin"
    }
}

results matching ""

    No results matching ""