调用ListNodeGroups查询当前阿里云账号下的节点分组列表。
限制说明
单阿里云账号调用该接口的每秒请求数(QPS)最大限制为5。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | ListNodeGroups |
系统规定参数。取值:ListNodeGroups。 |
| Limit | Long | 是 | 2 |
本次查询的分组数量,取值范围0~200。 |
| Offset | Long | 是 | 0 |
本次查询的起始位置,从0开始。 |
| IotInstanceId | String | 否 | iot-cn-0pp1n8t**** |
实例ID。 您可在物联网平台控制台的实例概览页面,查看当前实例的ID。若有ID值,必须传入该ID值,否则调用会失败。 说明 如果公共实例没有ID值,请参见如何获取实例ID。
|
| FuzzyName | String | 否 | test |
模糊匹配节点分组名称。 |
| FuzzyJoinEui | String | 否 | d896e0 |
模糊匹配节点分组所使用的JoinEUI。 |
| FuzzyDevEui | String | 否 | d896e0 |
模糊匹配分组中的节点DevEUI。 |
| SortingField | String | 否 | CREATED_MILLIS |
指定排序字段,取值为CREATED_MILLIS,表示根据创建时间排序。 |
| Ascending | Boolean | 否 | true |
配合SortingField参数一起使用,指定字段排序方式。取值:
|
调用API时,除了本文介绍的该API的特有请求参数,还需传入公共请求参数。公共请求参数说明,请参见公共参数文档。
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| Data | Struct |
调用成功时返回的当前阿里云账号下的节点分组列表。 |
|
| List | Array of NodeGroup |
节点分组列表。 |
|
| ClassMode | String | A |
节点分组中的节点所采用的LoRaWAN Class模式,与分组所关联的入网凭证中指定的一致。 |
| CreateMillis | Long | 1514736000000 |
节点分组的创建时间,格式为UNIX时间戳,以毫秒为单位。 |
| DataDispatchConfig | Struct |
节点分组的数据流转配置。 |
|
| Destination | String | IOT |
数据流转目的地。返回值:
|
| IotProduct | Struct |
如果流转目的地是物联网平台的产品,该字段存储产品信息。 |
|
| DebugSwitch | Boolean | false |
数据流转目的地为IOT的调试开关。返回值:
|
| ProductKey | String | xxxxxxxx |
产品的ProductKey。 |
| ProductName | String | 产品名 |
产品名称。 |
| ProductType | String | IOT_SUITE |
产品类型。返回值:
|
| OnsTopics | Struct |
如果流转目的地是MQ,该字段存储MQ Topic信息。 |
|
| DownlinkRegionName | String | cn-beijing |
MQ下行Region ID。 |
| DownlinkTopic | String | topic1 |
MQ下行Topic。 |
| UplinkRegionName | String | cn-shanghai |
MQ上行Region ID。 |
| UplinkTopic | String | topic2 |
MQ上行Topic。 |
| DataDispatchEnabled | Boolean | true |
节点分组的数据流转启停状态。返回值:
|
| FreqBandPlanGroupId | Long | 102 |
节点分组中的节点采用的频段ID,与分组所关联的入网凭证中指定的一致。 |
| JoinEui | String | 0000000000000000 |
节点分组中的节点使用的JoinEUI,与分组所关联的入网凭证中指定的JoinEUI一致。 |
| JoinPermissionEnabled | Boolean | true |
与节点分组关联的入网凭证的启停状态。返回值:
|
| JoinPermissionId | String | 123456 |
与节点分组关联的入网凭证的ID。 |
| JoinPermissionName | String | test |
与节点分组关联的入网凭证的名称。 |
| JoinPermissionOwnerAliyunId | String | some-user2 |
|
| JoinPermissionType | String | LOCAL |
与节点分组关联的入网凭证类型。返回值:
|
| Locks | Array of Lock |
节点分组所关联的操作锁列表。 |
|
| CreateMillis | Long | 1514736000000 |
锁的创建时间。 |
| Enabled | Boolean | true |
锁的启停用状态。 |
| LockId | String | 123 |
锁ID。 |
| LockType | String | WRITE |
锁的类型。返回值:WRITE,表示所有写操作都加锁,包括编辑、删除等。 |
| NodeGroupId | String | 123456 |
节点分组ID。 |
| NodeGroupName | String | 节点分组名称2 |
节点分组的名称。 |
| NodesCnt | Long | 10 |
节点分组中的节点数量。 |
| RxDailySum | Long | 0 |
与节点分组关联的入网凭证的当天上行数据包量。 |
| RxMonthSum | Long | 0 |
与节点分组关联的入网凭证的当月上行数据包量。 |
| TxDailySum | Long | 0 |
与节点分组关联的入网凭证的当天下行数据包量。 |
| TxMonthSum | Long | 0 |
与节点分组关联的入网凭证的当月下行数据包量。 |
| TotalCount | Long | 10 |
节点分组总数。 |
| RequestId | String | 89EF6CAA-958F-F32C-BE45-FE003C6DE097 |
阿里云为该请求生成的唯一标识符。 |
| Success | Boolean | true |
是否调用成功。返回值:
|
示例
请求示例
http(s)://linkwan.cn-shanghai.aliyuncs.com/?Action=ListNodeGroups
&Limit=2
&Offset=0
&<公共请求参数>
正常返回示例
XML格式
<ListNodeGroupsResponse>
<RequestId>89EF6CAA-958F-F32C-BE45-FE003C6DE097</RequestId>
<Data>
<TotalCount>10</TotalCount>
<List>
<NodesCnt>10</NodesCnt>
<RxMonthSum>0</RxMonthSum>
<ClassMode>A</ClassMode>
<NodeGroupName>节点分组名称2</NodeGroupName>
<RxDailySum>0</RxDailySum>
<TxDailySum>0</TxDailySum>
<TxMonthSum>0</TxMonthSum>
<JoinPermissionType>LOCAL</JoinPermissionType>
<JoinPermissionOwnerAliyunId>some-user2</JoinPermissionOwnerAliyunId>
<NodeGroupId>123456</NodeGroupId>
<CreateMillis>1514736000000</CreateMillis>
<JoinPermissionId>123456</JoinPermissionId>
<JoinPermissionName>test</JoinPermissionName>
<JoinPermissionEnabled>true</JoinPermissionEnabled>
<FreqBandPlanGroupId>102</FreqBandPlanGroupId>
<JoinEui>0</JoinEui>
<DataDispatchEnabled>true</DataDispatchEnabled>
<Locks>
<CreateMillis>1514736000000</CreateMillis>
<Enabled>true</Enabled>
<LockType>WRITE</LockType>
<LockId>123</LockId>
</Locks>
<DataDispatchConfig>
<Destination>IOT</Destination>
<IotProduct>
<DebugSwitch>false</DebugSwitch>
<ProductName>产品名</ProductName>
<ProductType>IOT_SUITE</ProductType>
<ProductKey>xxxxxxxx</ProductKey>
</IotProduct>
<OnsTopics></OnsTopics>
</DataDispatchConfig>
</List>
</Data>
<Success>true</Success>
</ListNodeGroupsResponse>
JSON格式
{
"RequestId": "89EF6CAA-958F-F32C-BE45-FE003C6DE097",
"Data": {
"TotalCount": 10,
"List": {
"NodesCnt": 10,
"RxMonthSum": 0,
"ClassMode": "A",
"NodeGroupName": "节点分组名称2",
"RxDailySum": 0,
"TxDailySum": 0,
"TxMonthSum": 0,
"JoinPermissionType": "LOCAL",
"JoinPermissionOwnerAliyunId": "some-user2",
"NodeGroupId": 123456,
"CreateMillis": 1514736000000,
"JoinPermissionId": 123456,
"JoinPermissionName": "test",
"JoinPermissionEnabled": true,
"FreqBandPlanGroupId": 102,
"JoinEui": 0,
"DataDispatchEnabled": true,
"Locks": {
"CreateMillis": 1514736000000,
"Enabled": true,
"LockType": "WRITE",
"LockId": 123
},
"DataDispatchConfig": {
"Destination": "IOT",
"IotProduct": {
"DebugSwitch": false,
"ProductName": "产品名",
"ProductType": "IOT_SUITE",
"ProductKey": "xxxxxxxx"
},
"OnsTopics": { }
}
}
},
"Success": true
}
错误码
| HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 400 | ForbiddenByRam | User not authorized to operate on the specified resource, or this API does not support RAM. | 用户没有执行该操作所需要的RAM权限。 |
| 400 | ForbiddenByRiskControl | This operation cannot be performed because of security risks. | 存在安全风险,无法执行该操作 |
| 400 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误。 |
| 400 | CloudProductNotActivated | The Link WAN service has not been activated. | 未开通 Link WAN 云产品 |
| 400 | FeatureNotActivated | The feature has not been activated. | 功能未开通 |
访问错误中心查看更多错误码。