简体   繁体   English

如何使用API​​ KEYS将传感器设备连接到IOTF

[英]How to connect sensor devices to IOTF using API KEYS

I am doing an android application, I'd like to know how to connect sensor devices/applications to Bluemix IoTF using API keys, by saying that I just want to minimize the registration task from client side(sensor devices)as much as possible. 我正在做一个android应用程序,我想知道如何使用API​​密钥将传感器设备/应用程序连接到Bluemix IoTF,我只是想尽可能地减少来自客户端(传感器设备)的注册任务。 I know how to register devices with deivce Id,token and authentication manually. 我知道如何手动注册具有设备ID,令牌和身份验证的设备。 but I just like to know that is there any other easy way around to do it. 但我只是想知道,还有其他简便的方法可以做到这一点。 It would be great If I got some one shed light on this from scratch. 如果我能从头开始阐明这一点,那就太好了。 Thanks in advance. 提前致谢。

There is a rich set of REST based APIs available at: 在以下位置提供了丰富的基于REST的API集:

https://docs.internetofthings.ibmcloud.com/devices/api.html https://docs.internetofthings.ibmcloud.com/devices/api.html

and fully documented here: 并在此处完整记录:

https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#/ https://docs.internetofthings.ibmcloud.com/swagger/v0002.html#/

One can use excellent REST based testing tools such as Postman for REST testing. 可以使用优秀的基于REST的测试工具(例如Postman)进行REST测试。

The reason I mention the REST APIs is that they provide a way for scripting or automating the registration of devices. 我之所以提到REST API,是因为它们提供了一种脚本化或自动注册设备的方式。 There is an API called "Add device" that, when called, will register a new device instance of a specific device type against your IoT Foundation instance. 有一个名为“添加设备”的API,该API在被调用时将针对您的IoT Foundation实例注册具有特定设备类型的新设备实例。

I could imagine a new device that knows it is not registered executing a self registration request to define itself as a new device type. 我可以想象一个知道自己没有被注册的新设备会执行自我注册请求来将自己定义为新设备类型。 What I would next suggest is that you read the links above and see if they make sense. 接下来,我建议您阅读上面的链接,看看它们是否有意义。 If they answer your question fully, great. 如果他们能完全回答您的问题,那就太好了。 If not, simply post a new question that is specifically targeted at a specific areas and we'll be watching this set of tags and respond back as quickly as we can. 如果不是,只需发布​​一个专门针对特定区域的新问题,我们将观看这组标签并尽快回复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM