当前位置:网站首页>华为云IOT平台设备获取api调用笔记
华为云IOT平台设备获取api调用笔记
2022-08-11 05:24:00 【Three Big Stones】
目的:验证华为云IOT平台的设备获取接口连通性
1、注册IAM账户
地址:https://console.huaweicloud.com/iam/?region=cn-north-4#/iam/users
选择权限组,
2、创建好IAM后,需要重新登陆,并修改IAM账户密码
3、token获取
参考文档:认证鉴权_设备接入 IoTDA_API参考_应用侧API参考_如何调用API_华为云
在postman中调试接口,
post请求:https://iam.cn-north-4.myhuaweicloud.com/v3/auth/tokens
Header参数:Content-Type:application/json
Body参数:
{
"auth": {
"identity": {
"methods": [
"password"
],
"password": {
"user": {
"name": "IAM用户名",
"password": "IAM账户的密码",
"domain": {
"name": "IAM账户名"
}
}
}
},
"scope": {
"project": {
"name": "项目名"
}
}
}
}
响应结果,可以看出token在响应头里面:
4、使用token调用设备获取接口
参考文档地址:https://apiexplorer.developer.huaweicloud.com/apiexplorer/debug?product=IoTDA&api=ListDevices
GET请求地址:https://iotda.cn-north-4.myhuaweicloud.com/v5/iot/5f5d6375d5da4499b241ac5f948a80bf/devices
Headers头部设置参数X-Auth-Token,为token的值
Body参数:无
响应结果:
{
"devices": [
{
"app_id": "080be467039547fcb519a8c6e7edb606",
"app_name": "DefaultApp_62ec18et",
"device_id": "62ec8d225f266f255bb99479_ZWG400-COM-002",
"node_id": "ZWG400-COM-002",
"gateway_id": "62ec8d225f266f255bb99479_ZWG400-COM-002",
"device_name": "002模块",
"node_type": "GATEWAY",
"description": null,
"fw_version": null,
"sw_version": null,
"device_sdk_version": null,
"product_id": "62ec8d225f266f255bb99479",
"product_name": "测试数传模块",
"status": "INACTIVE",
"tags": []
},
{
"app_id": "080be467039547fcb519a8c6e7edb606",
"app_name": "DefaultApp_62ec18et",
"device_id": "62ec8d225f266f255bb99479_Mobile-001",
"node_id": "Mobile-001",
"gateway_id": "62ec8d225f266f255bb99479_Mobile-001",
"device_name": "手机应用端",
"node_type": "GATEWAY",
"description": null,
"fw_version": null,
"sw_version": null,
"device_sdk_version": null,
"product_id": "62ec8d225f266f255bb99479",
"product_name": "测试数传模块",
"status": "OFFLINE",
"tags": []
},
{
"app_id": "080be467039547fcb519a8c6e7edb606",
"app_name": "DefaultApp_62ec18et",
"device_id": "62ec8d225f266f255bb99479_ZWG400-COM-001",
"node_id": "ZWG400-COM-001",
"gateway_id": "62ec8d225f266f255bb99479_ZWG400-COM-001",
"device_name": "001模块",
"node_type": "GATEWAY",
"description": null,
"fw_version": null,
"sw_version": null,
"device_sdk_version": null,
"product_id": "62ec8d225f266f255bb99479",
"product_name": "测试数传模块",
"status": "OFFLINE",
"tags": []
}
],
"page": {
"count": 3,
"marker": "62ecba6e2766a210982ceed2"
}
}
边栏推荐
- 目标检测——卷积神经网路基础知识
- CVPR2022——Not All Points Are Equal : IA-SSD
- CMT2380F32模块开发9-可编程计数阵列 PCA例程
- 动画(其一)
- 【高德地图】易采坑合集
- 关于安全帽识别系统,你需要知道的选择要点
- Introduction of safety helmet wearing recognition system
- Joint 3D Instance Segmentation and Object Detection for Autonomous Driving
- 关于mmdetection框架实用小工具说明
- 实时姿态估计--基于空洞卷积的人体姿态估计网络
猜你喜欢
随机推荐
Mei cole studios - deep learning second BP neural network
梅科尔工作室-DjangoWeb 应用框架+MySQL数据库第六次培训
CMT2380F32模块开发6-flash例程
RecycleView
360°大视野安全帽识别系统-深度学习智能视频分析
内核与用户空间通过字符设备通信
恶劣天气 3D 目标检测数据集收集
Diagnostic Log and Trace——开发人员如何使用 DLT
2022年最新安全帽佩戴识别系统
SCNet: Semantic Consistency Networks for 3D Object Detection
10 个超好用的 DataGrip 快捷键,快加入收藏! | 实用技巧
CVPR2022——Not All Points Are Equal : IA-SSD
目标检测思维导图
动画(其二)
微信小程序部分功能细节
Use regex to verify whether the file name is legal
The selection points you need to know about the helmet identification system
Reconstruction and Synthesis of Lidar Point Clouds of Spray
珍爱网App竞品分析报告
Robust 3D Object Detection in Cold Weather Conditions