Skip to content

Latest commit

 

History

History
44 lines (40 loc) · 1.9 KB

http-api.md

File metadata and controls

44 lines (40 loc) · 1.9 KB
layout docwithnav
assignees
ashvayka
title HTTP Device API Reference
description Supported HTTP API Reference for IoT Devices
redirect_from /docs/reference/http-api
server-side-rpc
0 1 2 3 4
image title
/images/reference/device-connectivity-apis/server-side-rpc-http-1-ce.png
Use RPC debug terminal dashboard
image title
/images/reference/device-connectivity-apis/server-side-rpc-http-2-ce.png
Subscribe to RPC commands from the server. To do this, in the first terminal window send GET request with observe flag
image title
/images/reference/device-connectivity-apis/server-side-rpc-http-3-ce.png
Send an RPC request "connect" to the device
image title
/images/reference/device-connectivity-apis/server-side-rpc-http-4-ce.png
In the second terminal window simulate send a response from the device to the server
image title
/images/reference/device-connectivity-apis/server-side-rpc-http-5-ce.png
You should receive a response from the device: {"result":"ok"}
client-side-rpc
0 1 2 3 4
image title
/images/reference/device-connectivity-apis/client-side-rpc-1-ce.png
Add two nodes to the Rule Chain: "script" and "rpc call reply"
image title
/images/reference/device-connectivity-apis/client-side-rpc-2-ce.png
In the script node enter the function: return {msg: {time:String(new Date())}, metadata: metadata, msgType: msgType};
image
/images/reference/device-connectivity-apis/client-side-rpc-3-ce.png
image title
/images/reference/device-connectivity-apis/client-side-rpc-http-4-ce.png
Send request to the server
image title
/images/reference/device-connectivity-apis/client-side-rpc-http-5-ce.png
You should receive a response from the server

{% include docs/reference/http-api.md %}