Skip to content

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(单次响应)。

请求参数 ​

名称类型必填说明
limituint32按业务校验本次最多返回条数。 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.
offsetuint32按业务校验分页起始偏移。 Offset in the result-set (for pagination).
application_idstring按业务校验应用 UUID。 Application ID (UUID).

返回值 ​

名称类型必填说明
total_countuint32按业务校验符合条件的总条数。 Total number of relays.
resultrepeated api.RelayListItem按业务校验结果列表或结果内容。 Result-set.

错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。

AddDevice ​

接口名称: api.RelayService/AddDevice

功能: 添加组播终端成员。AddDevice adds the given device to the relay.

请求: api.AddRelayDeviceRequest;返回: google.protobuf.Empty(单次响应)。

请求参数 ​

名称类型必填说明
relay_dev_euistring按业务校验Relay DevEUI (EUI64).
device_dev_euistring按业务校验Device DevEUI (EUI64).

返回值 ​

无字段。

错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。

RemoveDevice ​

接口名称: api.RelayService/RemoveDevice

功能: 移除组播终端成员。RemoveDevice removes the given device from the relay.

请求: api.RemoveRelayDeviceRequest;返回: google.protobuf.Empty(单次响应)。

请求参数 ​

名称类型必填说明
relay_dev_euistring按业务校验Relay DevEUI (EUI64).
device_dev_euistring按业务校验Device DevEUI (EUI64).

返回值 ​

无字段。

错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。

ListDevices ​

接口名称: api.RelayService/ListDevices

功能: 列出 Devices。ListDevices lists the devices for the given relay.

请求: api.ListRelayDevicesRequest;返回: api.ListRelayDevicesResponse(单次响应)。

请求参数 ​

名称类型必填说明
limituint32按业务校验本次最多返回条数。 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.
offsetuint32按业务校验分页起始偏移。 Offset in the result-set (for pagination).
relay_dev_euistring按业务校验Relay DevEUI (EUI64).

返回值 ​

名称类型必填说明
total_countuint32按业务校验符合条件的总条数。 Total number of devices.
resultrepeated api.RelayDeviceListItem按业务校验结果列表或结果内容。 Result-set.

错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。

嵌套消息结构 ​

api.AddRelayDeviceRequest ​

名称类型必填说明
relay_dev_euistring按业务校验Relay DevEUI (EUI64).
device_dev_euistring按业务校验Device DevEUI (EUI64).

api.ListRelayDevicesRequest ​

名称类型必填说明
limituint32按业务校验本次最多返回条数。 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.
offsetuint32按业务校验分页起始偏移。 Offset in the result-set (for pagination).
relay_dev_euistring按业务校验Relay DevEUI (EUI64).

api.ListRelayDevicesResponse ​

名称类型必填说明
total_countuint32按业务校验符合条件的总条数。 Total number of devices.
resultrepeated api.RelayDeviceListItem按业务校验结果列表或结果内容。 Result-set.

api.ListRelaysRequest ​

名称类型必填说明
limituint32按业务校验本次最多返回条数。 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.
offsetuint32按业务校验分页起始偏移。 Offset in the result-set (for pagination).
application_idstring按业务校验应用 UUID。 Application ID (UUID).

api.ListRelaysResponse ​

名称类型必填说明
total_countuint32按业务校验符合条件的总条数。 Total number of relays.
resultrepeated api.RelayListItem按业务校验结果列表或结果内容。 Result-set.

api.RelayDeviceListItem ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
created_atgoogle.protobuf.Timestamp按业务校验创建时间。 Created at timestamp.
namestring按业务校验名称。 Device name.

api.RelayListItem ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
namestring按业务校验名称。 Name.

api.RemoveRelayDeviceRequest ​

名称类型必填说明
relay_dev_euistring按业务校验Relay DevEUI (EUI64).
device_dev_euistring按业务校验Device DevEUI (EUI64).

设备使用指南