By using a HTTP/HTTPS Transport in this chapter, we describe the send stream from device to the platform.
If you send stream by REST,refer /wiki/spaces/TD/pages/491564
Send stream from device
HTTP/HTTPS Endpoint
URI | HTTP Method | API version |
---|---|---|
| POST | 1.x |
| POST | 2.x |
Parameters
Expand | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||
Code Block | title |
Code Block | language | js |
|
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Infonote | |
---|---|
title | About RateLimitingIf you want to use the device connector in HTTP / HTTPS, rate limit (flow control) mechanism will be applied. Currently, it is limited to a single data transmission per second. HTTPS / HTTPS device connectors are available for devices that can not use the MQTT. |
Code Block | |
(API v2.x)curl example
Code Block |
---|
curl -X POST -v -H "X-DEVICETOKEN: DEVICE_TOKEN_HERE" -H "X-DEVICEID: DEVICE_ID_HERE" -H "Content-Type: application/json" -d '{"temp":25}' -k https://m.thingscale.io/post_v2/ |
...