切换深色模式
Relay API
本页列出当前版本的完整方法及字段。方法通过 gRPC / gRPC-Web 调用;REST 注解不表示已部署 REST Gateway。
“必填:按业务校验”表示 proto3 未声明 required,不代表留空一定可用。UUID、EUI、权限、资源存在性与字段组合由服务端校验。嵌套结构详见页末消息结构。
RelayService
List
接口名称: api.RelayService/List
功能: 列出 对应资源。List lists the relays for the given application id.
请求: api.ListRelaysRequest;返回: api.ListRelaysResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | uint32 | 按业务校验 | 本次最多返回条数。 Max number of devices to return in the result-set. If not set, it will be treated as 0, and the response will only return the total_count. |
offset | uint32 | 按业务校验 | 分页起始偏移。 Offset in the result-set (for pagination). |
application_id | string | 按业务校验 | 应用 UUID。 Application ID (UUID). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of relays. |
result | repeated api.RelayListItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
AddDevice
接口名称: api.RelayService/AddDevice
功能: 添加组播终端成员。AddDevice adds the given device to the relay.
请求: api.AddRelayDeviceRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
relay_dev_eui | string | 按业务校验 | Relay DevEUI (EUI64). |
device_dev_eui | string | 按业务校验 | Device DevEUI (EUI64). |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
RemoveDevice
接口名称: api.RelayService/RemoveDevice
功能: 移除组播终端成员。RemoveDevice removes the given device from the relay.
请求: api.RemoveRelayDeviceRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
relay_dev_eui | string | 按业务校验 | Relay DevEUI (EUI64). |
device_dev_eui | string | 按业务校验 | Device DevEUI (EUI64). |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
ListDevices
接口名称: api.RelayService/ListDevices
功能: 列出 Devices。ListDevices lists the devices for the given relay.
请求: api.ListRelayDevicesRequest;返回: api.ListRelayDevicesResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | uint32 | 按业务校验 | 本次最多返回条数。 Max number of multicast groups to return in the result-set. If not set, it will be treated as 0, and the response will only return the total_count. |
offset | uint32 | 按业务校验 | 分页起始偏移。 Offset in the result-set (for pagination). |
relay_dev_eui | string | 按业务校验 | Relay DevEUI (EUI64). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of devices. |
result | repeated api.RelayDeviceListItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
嵌套消息结构
api.AddRelayDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
relay_dev_eui | string | 按业务校验 | Relay DevEUI (EUI64). |
device_dev_eui | string | 按业务校验 | Device DevEUI (EUI64). |
api.ListRelayDevicesRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | uint32 | 按业务校验 | 本次最多返回条数。 Max number of multicast groups to return in the result-set. If not set, it will be treated as 0, and the response will only return the total_count. |
offset | uint32 | 按业务校验 | 分页起始偏移。 Offset in the result-set (for pagination). |
relay_dev_eui | string | 按业务校验 | Relay DevEUI (EUI64). |
api.ListRelayDevicesResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of devices. |
result | repeated api.RelayDeviceListItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
api.ListRelaysRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
limit | uint32 | 按业务校验 | 本次最多返回条数。 Max number of devices to return in the result-set. If not set, it will be treated as 0, and the response will only return the total_count. |
offset | uint32 | 按业务校验 | 分页起始偏移。 Offset in the result-set (for pagination). |
application_id | string | 按业务校验 | 应用 UUID。 Application ID (UUID). |
api.ListRelaysResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of relays. |
result | repeated api.RelayListItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
api.RelayDeviceListItem
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
created_at | google.protobuf.Timestamp | 按业务校验 | 创建时间。 Created at timestamp. |
name | string | 按业务校验 | 名称。 Device name. |
api.RelayListItem
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
name | string | 按业务校验 | 名称。 Name. |
api.RemoveRelayDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
relay_dev_eui | string | 按业务校验 | Relay DevEUI (EUI64). |
device_dev_eui | string | 按业务校验 | Device DevEUI (EUI64). |