iot curl 详解


[site]
====================================================
curl -X GET http://127.0.0.1:5000/iot/api/sites


curl -X GET http://127.0.0.1:5000/iot/api/sites/7b0db932-43c2-11e8-a7b2-705ab6ad9cae


curl -X POST http://127.0.0.1:5000/iot/api/sites -d '{"token":"","name":"test","description":"test site","metadata" : { } }'


curl -X DELET http://127.0.0.1:5000/iot/api/sites/9f55bdc8-430c-11e8-a46b-00231487c7b4


curl -X PUT http://127.0.0.1:5120/iot/spi/sites -d '{"token":"7b0db932-43c2-11e8-a7b2-705ab6ad9cae","name":"test","description":"test site","metadata" : {"type":"test"} }'


[user]
===================================================================
curl -X GET http://127.0.0.1:5120/iot/spi/users


curl -X GET http://127.0.0.1:5000/iot/api/users/atm


curl -X POST http://127.0.0.1:5000/iot/api/users -d '{"username":"atm","hashedPassword":"123456","metadata":{}}'


curl -X DELET http://127.0.0.1:5000/iot/api/users/atm006


curl -X PUT http://127.0.0.1:5120/iot/spi/users -d '{"username":"atm","hashedPassword":"1234561","metadata":{}}'




[tenant]
====================================================================
curl -X GET http://127.0.0.1:5120/iot/spi/tenants


curl -X GET http://127.0.0.1:5000/iot/api/tenants/test1


curl -X POST http://127.0.0.1:5000/iot/api/tenants -d '{"id":"test","name":"test tenant","authenticationToken":"","authorizedUserIds":["admin"],"metadata" : {}}'


curl -X DELET http://127.0.0.1:5000/iot/api/tenants


curl -X PUT http://127.0.0.1:5120/iot/spi/tenants -d '{"id":"test","name":"test tenant","authenticationToken":"123","authorizedUserIds":["admin"],"metadata" : {}}'


[event]
===============================================================
curl -X GET http://127.0.0.1:5000/iot/api/devices/test1234560/events/


curl -X POST http://127.0.0.1:5000/iot/api/devices/test1234560/events/ -d '{"eventType":"test","siteToken":"testtoken","hardwareId":"test123456","metadata":{},"eventbody":{}}'




[device]
==============================================================
curl -X GET http://127.0.0.1:5000/iot/api/devices


curl -X GET http://127.0.0.1:5000/iot/api/devices/test1234560


curl -X POST  http://127.0.0.1:5000/iot/api/devices -d '{"hardwareId":"test123456","siteToken":"","comments":"","metadata": {}}'


curl -X DELET http://127.0.0.1:5000/iot/api/devices/test1234560


curl -X PUT http://127.0.0.1:5120/iot/spi/devices -d '{"hardwareId":"test123456","siteToken":"1234","comments":"","metadata": {}}'
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值