From 70780d9e0ad5eb431ef9f57336d8f833401658bb Mon Sep 17 00:00:00 2001 From: Boris <969032536@qq.com> Date: Mon, 14 Dec 2020 18:05:42 +0800 Subject: [PATCH] add docs --- docs/UserGuide/Client/Restful API.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/UserGuide/Client/Restful API.md b/docs/UserGuide/Client/Restful API.md index 7264b9d655..1c7fcfda18 100644 --- a/docs/UserGuide/Client/Restful API.md +++ b/docs/UserGuide/Client/Restful API.md @@ -21,4 +21,20 @@ # Restful API +### Basic usage of restful api + +Before you use restful api, you have to login. + +``` +curl http://localhost:8282/user/login?username=root&password=root +``` + +Then insert some values. + +``` +curl -H "Content-Type: application/json" -X POST --data '[{"deviceId": "root.ln.wf01.wt01","measurements": ["temperature","status"],"timestamps": 1,"values": [1.1,false]}]' http://localhost:8282/insert +``` + + + check details in [Restful doc](https://documenter.getpostman.com/view/12320024/T1LLDnuj). \ No newline at end of file -- GitLab