当前位置:网站首页>华为云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"
}
}边栏推荐
- CMT2380F32模块开发5-CLK例程
- 自定义形状seekbar学习--方向盘view
- 实时姿态估计--基于空洞卷积的人体姿态估计网络
- 安全帽佩戴识别系统介绍
- vmware不可恢复错误vmui
- 目标检测前言
- Rethinking LiDAR Object Detection in adverse weather conditions
- LAGRANGIAN FLUID SIMULATION WITH CONTINUOUS CONVOLUTIONS
- 安全帽识别系统-为安全生产保驾护航
- The selection points you need to know about the helmet identification system
猜你喜欢

微信小程序部分功能细节

咕咚vs悦跑圈的竞品分析

梅科尔工作室-HarmonyOS应用开发的第二次培训

Waymo dataset usage introduction (waymo-open-dataset)

安全帽识别算法

LiDAR Snowfall Simulation for Robust 3D Object Detection

TAMNet: A loss-balanced multi-task model for simultaneous detection and segmentation

Mei cole studios - fifth training DjangoWeb application framework + MySQL database

pip安装报错:is not a supported wheel on this platform

Use regex to verify whether the file name is legal
随机推荐
Maykle Studio - HarmonyOS Application Development Third Training
Safety helmet identification system - escort for safe production
目标检测——Faster-RCNN 之 RCNN
AI智能图像识别的工作原理及行业应用
Joint 3D Instance Segmentation and Object Detection for Autonomous Driving
电商机会:私域
AIDL 简介以及使用
博客目录
安全帽识别-施工安全的“监管者”
Reconstruction and Synthesis of Lidar Point Clouds of Spray
CMT2380F32模块开发1-硬件
pip安装报错:is not a supported wheel on this platform
弱监督语义分割CLIMS(CVPR2022)
arduino的esp32环境搭建(不需要翻墙,不需要离线安装)
OpenPCDet installs the latest version: spconv in one step
自定义形状seekbar学习--方向盘view
AI-based intelligent image recognition: 4 different industry applications
Kotlin 增量编译的新方式 | 技术解析
CVPR2022——Not All Points Are Equal : IA-SSD
The latest safety helmet wearing recognition system in 2022