Skip to content

终端与下行队列 API ​

本页列出当前版本的完整方法及字段。方法通过 gRPC / gRPC-Web 调用;REST 注解不表示已部署 REST Gateway。

“必填:按业务校验”表示 proto3 未声明 required,不代表留空一定可用。UUID、EUI、权限、资源存在性与字段组合由服务端校验。嵌套结构详见页末消息结构。

调用方式、鉴权与错误处理

DeviceService ​

Create ​

接口名称: api.DeviceService/Create

功能: 创建 对应资源。Create the given device.

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

请求参数 ​

名称类型必填说明
deviceapi.Device按业务校验终端对象。 Device object.

返回值 ​

无字段。

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

Get ​

接口名称: api.DeviceService/Get

功能: 查询 对应资源。Get returns the device for the given DevEUI.

请求: api.GetDeviceRequest;返回: api.GetDeviceResponse(单次响应)。

请求参数 ​

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

返回值 ​

名称类型必填说明
deviceapi.Device按业务校验终端对象。 Device object.
created_atgoogle.protobuf.Timestamp按业务校验创建时间。 Created at timestamp.
updated_atgoogle.protobuf.Timestamp按业务校验最后更新时间。 Last update timestamp.
last_seen_atgoogle.protobuf.Timestamp按业务校验最后上报时间。 Last seen at timestamp.
device_statusapi.DeviceStatus按业务校验终端状态。 Device status.
class_enabledcommon.DeviceClass {CLASS_A=0, CLASS_B=1, CLASS_C=2}按业务校验已启用的 Class。 Enabled device class.

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

Update ​

接口名称: api.DeviceService/Update

功能: 更新 对应资源。Update the given device.

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

请求参数 ​

名称类型必填说明
deviceapi.Device按业务校验终端对象。 Device object.

返回值 ​

无字段。

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

Delete ​

接口名称: api.DeviceService/Delete

功能: 删除 对应资源。Delete the device with the given DevEUI.

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

请求参数 ​

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

返回值 ​

无字段。

操作影响

此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。

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

List ​

接口名称: api.DeviceService/List

功能: 列出 对应资源。Get the list of devices.

请求: api.ListDevicesRequest;返回: api.ListDevicesResponse(单次响应)。

请求参数 ​

名称类型必填说明
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).
searchstring按业务校验搜索关键字。 If set, the given string will be used to search on name (optional).
application_idstring按业务校验应用 UUID。 Application ID (UUID) to filter devices on.
multicast_group_idstring按业务校验组播组 UUID。 Multicst-group ID (UUID) to filter devices on.
order_byapi.ListDevicesRequest.OrderBy {NAME=0, DEV_EUI=1, LAST_SEEN_AT=2, DEVICE_PROFILE_NAME=3}按业务校验If set, the given value will be used to sort by (optional).
order_by_descbool按业务校验If set, the sorting direction will be decending (default = ascending) (optional).
tagsmap<string, string>按业务校验自定义字符串标签。 Tags to filter devices on.
device_profile_idstring按业务校验终端模版 UUID。 Device-profile ID (UUID) to filter devices on.

返回值 ​

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

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

CreateKeys ​

接口名称: api.DeviceService/CreateKeys

功能: 创建终端根密钥。Create the given device-keys.

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

请求参数 ​

名称类型必填说明
device_keysapi.DeviceKeys按业务校验Device-keys object.

返回值 ​

无字段。

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

GetKeys ​

接口名称: api.DeviceService/GetKeys

功能: 查询终端根密钥。Get the device-keys for the given DevEUI.

请求: api.GetDeviceKeysRequest;返回: api.GetDeviceKeysResponse(单次响应)。

请求参数 ​

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

返回值 ​

名称类型必填说明
device_keysapi.DeviceKeys按业务校验Device-keys object.
created_atgoogle.protobuf.Timestamp按业务校验创建时间。 Created at timestamp.
updated_atgoogle.protobuf.Timestamp按业务校验最后更新时间。 Last update timestamp.

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

UpdateKeys ​

接口名称: api.DeviceService/UpdateKeys

功能: 更新终端根密钥。Update the given device-keys.

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

请求参数 ​

名称类型必填说明
device_keysapi.DeviceKeys按业务校验Device-keys object.

返回值 ​

无字段。

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

DeleteKeys ​

接口名称: api.DeviceService/DeleteKeys

功能: 删除终端根密钥。Delete the device-keys for the given DevEUI.

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

请求参数 ​

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

返回值 ​

无字段。

操作影响

此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。

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

FlushDevNonces ​

接口名称: api.DeviceService/FlushDevNonces

功能: 清空 DevNonces。FlushDevNonces flushes the OTAA device nonces.

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

请求参数 ​

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

返回值 ​

无字段。

操作影响

此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。

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

Activate ​

接口名称: api.DeviceService/Activate

功能: 激活 ABP 会话。Activate (re)activates the device with the given parameters (for ABP or for importing OTAA activations).

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

请求参数 ​

名称类型必填说明
device_activationapi.DeviceActivation按业务校验终端会话激活参数。 Device activation object.

返回值 ​

无字段。

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

Deactivate ​

接口名称: api.DeviceService/Deactivate

功能: 停用当前会话。Deactivate de-activates the device.

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

请求参数 ​

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

返回值 ​

无字段。

操作影响

此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。

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

GetActivation ​

接口名称: api.DeviceService/GetActivation

功能: 查询当前会话。GetActivation returns the current activation details of the device (OTAA or ABP).

请求: api.GetDeviceActivationRequest;返回: api.GetDeviceActivationResponse(单次响应)。

请求参数 ​

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

返回值 ​

名称类型必填说明
device_activationapi.DeviceActivation按业务校验终端会话激活参数。 Device activation object.
join_server_contextcommon.JoinServerContext按业务校验Join-Server context. A non-empty value indicatest that ChirpStack does not have access to the AppSKey and that the encryption / decryption of the payloads is the responsibility of the end-application.

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

GetRandomDevAddr ​

接口名称: api.DeviceService/GetRandomDevAddr

功能: 查询 RandomDevAddr。GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.

请求: api.GetRandomDevAddrRequest;返回: api.GetRandomDevAddrResponse(单次响应)。

请求参数 ​

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

返回值 ​

名称类型必填说明
dev_addrstring按业务校验会话短地址。 DevAddr.

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

GetMetrics ​

接口名称: api.DeviceService/GetMetrics

功能: 查询 Metrics。GetMetrics returns the device metrics. Note that this requires a device-profile with codec and measurements configured.

请求: api.GetDeviceMetricsRequest;返回: api.GetDeviceMetricsResponse(单次响应)。

请求参数 ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
startgoogle.protobuf.Timestamp按业务校验起始时间。 Interval start timestamp.
endgoogle.protobuf.Timestamp按业务校验结束时间。 Interval end timestamp.
aggregationcommon.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3}按业务校验聚合粒度。 Aggregation.

返回值 ​

名称类型必填说明
metricsmap<string, common.Metric>按业务校验指标集合。
statesmap<string, api.DeviceState>按业务校验消息定义未补充字段说明。

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

GetLinkMetrics ​

接口名称: api.DeviceService/GetLinkMetrics

功能: 查询 LinkMetrics。GetLinkMetrics returns the device link metrics. This includes uplinks, downlinks, RSSI, SNR, etc...

请求: api.GetDeviceLinkMetricsRequest;返回: api.GetDeviceLinkMetricsResponse(单次响应)。

请求参数 ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
startgoogle.protobuf.Timestamp按业务校验起始时间。 Interval start timestamp.
endgoogle.protobuf.Timestamp按业务校验结束时间。 Interval end timestamp.
aggregationcommon.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3}按业务校验聚合粒度。 Aggregation.

返回值 ​

名称类型必填说明
rx_packetscommon.Metric按业务校验Packets received from the device.
gw_rssicommon.Metric按业务校验RSSI (as reported by the gateway(s)).
gw_snrcommon.Metric按业务校验SNR (as reported by the gateway(s)).
rx_packets_per_freqcommon.Metric按业务校验Packets received by frequency.
rx_packets_per_drcommon.Metric按业务校验Packets received by DR.
errorscommon.Metric按业务校验Errors.

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

Enqueue ​

接口名称: api.DeviceService/Enqueue

功能: 将下行加入队列。Enqueue adds the given item to the downlink queue.

请求: api.EnqueueDeviceQueueItemRequest;返回: api.EnqueueDeviceQueueItemResponse(单次响应)。

请求参数 ​

名称类型必填说明
queue_itemapi.DeviceQueueItem按业务校验待加入的下行条目。 Item to enqueue.
flush_queuebool按业务校验是否清空队列。 Flush queue before enqueue.

返回值 ​

名称类型必填说明
idstring按业务校验资源 ID。 ID (UUID).

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

FlushQueue ​

接口名称: api.DeviceService/FlushQueue

功能: 清空待发队列。FlushQueue flushes the downlink device-queue.

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

请求参数 ​

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

返回值 ​

无字段。

操作影响

此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。

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

GetQueue ​

接口名称: api.DeviceService/GetQueue

功能: 查询下行队列。GetQueue returns the downlink device-queue.

请求: api.GetDeviceQueueItemsRequest;返回: api.GetDeviceQueueItemsResponse(单次响应)。

请求参数 ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 Device EUI (EUI64).
count_onlybool按业务校验Return only the count, not the result-set.

返回值 ​

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

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

GetNextFCntDown ​

接口名称: api.DeviceService/GetNextFCntDown

功能: 查询 NextFCntDown。GetNextFCntDown returns the next FCntDown to use for enqueing encrypted downlinks. The difference with the DeviceActivation f_cont_down is that this method takes potential existing queue-items into account.

请求: api.GetDeviceNextFCntDownRequest;返回: api.GetDeviceNextFCntDownResponse(单次响应)。

请求参数 ​

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

返回值 ​

名称类型必填说明
f_cnt_downuint32按业务校验FCntDown.

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

嵌套消息结构 ​

api.ActivateDeviceRequest ​

名称类型必填说明
device_activationapi.DeviceActivation按业务校验终端会话激活参数。 Device activation object.

api.CreateDeviceKeysRequest ​

名称类型必填说明
device_keysapi.DeviceKeys按业务校验Device-keys object.

api.CreateDeviceRequest ​

名称类型必填说明
deviceapi.Device按业务校验终端对象。 Device object.

api.DeactivateDeviceRequest ​

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

api.DeleteDeviceKeysRequest ​

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

api.DeleteDeviceRequest ​

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

api.Device ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
namestring按业务校验名称。 Name.
descriptionstring按业务校验描述。 Description.
application_idstring按业务校验应用 UUID。 Application ID (UUID).
device_profile_idstring按业务校验终端模版 UUID。 Device-profile ID (UUID).
skip_fcnt_checkbool按业务校验是否跳过帧计数检查。 Skip frame-counter checks (this is insecure, but could be helpful for debugging).
is_disabledbool按业务校验是否禁用。 Device is disabled.
variablesmap<string, string>按业务校验变量映射。 Variables (user defined). These variables can be used together with integrations to store tokens / secrets that must be configured per device. These variables are not exposed in the event payloads.
tagsmap<string, string>按业务校验自定义字符串标签。 Tags (user defined). These tags can be used to add additional information to the device. These tags are exposed in all the integration events.
join_euistring按业务校验JoinEUI。 JoinEUI (optional, EUI64). This field will be automatically set / updated on OTAA. However, in some cases it must be pre-configured. For example to allow OTAA using a Relay. In this case the Relay needs to know the JoinEUI + DevEUI combinations of the devices for which it needs to forward uplinks.

api.Device.TagsEntry ​

名称类型必填说明
keystring按业务校验消息定义未补充字段说明。
valuestring按业务校验消息定义未补充字段说明。

api.Device.VariablesEntry ​

名称类型必填说明
keystring按业务校验消息定义未补充字段说明。
valuestring按业务校验消息定义未补充字段说明。

api.DeviceActivation ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 Device EUI (EUI64).
dev_addrstring按业务校验会话短地址。 Device address (HEX encoded).
app_s_keystring按业务校验应用会话密钥。 Application session key (HEX encoded).
nwk_s_enc_keystring按业务校验网络会话加密密钥。 Network session encryption key (HEX encoded). Note: For LoRaWAN 1.0.x devices, set this to the NwkSKey.
s_nwk_s_int_keystring按业务校验服务网络会话完整性密钥。 Serving network session integrity key (HEX encoded). Note: For LoRaWAN 1.0.x devices, set this to the NwkSKey.
f_nwk_s_int_keystring按业务校验转发网络会话完整性密钥。 Forwarding network session integrity key (HEX encoded). Note: For LoRaWAN 1.0.x devices, set this to the NwkSKey.
f_cnt_upuint32按业务校验上行帧计数。 Uplink frame-counter.
n_f_cnt_downuint32按业务校验网络下行帧计数。 Downlink network frame-counter.
a_f_cnt_downuint32按业务校验应用下行帧计数。 Downlink application frame-counter.

api.DeviceKeys ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
nwk_keystring按业务校验网络根密钥。 Network root key (128 bit). Note: For LoRaWAN 1.0.x, use this field for the LoRaWAN 1.0.x 'AppKey`!
app_keystring按业务校验应用根密钥。 Application root key (128 bit). Note: This field only needs to be set for LoRaWAN 1.1.x devices!
gen_app_keystring按业务校验Gen App Key (128 bit). Note: This field only needs to be set for LoRaWAN 1.0.x devices that implement TS005 (remote multicast setup).

api.DeviceListItem ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
created_atgoogle.protobuf.Timestamp按业务校验创建时间。 Created at timestamp.
updated_atgoogle.protobuf.Timestamp按业务校验最后更新时间。 Last update timestamp.
last_seen_atgoogle.protobuf.Timestamp按业务校验最后上报时间。 Last seen at timestamp.
namestring按业务校验名称。 Name.
descriptionstring按业务校验描述。 Description.
device_profile_idstring按业务校验终端模版 UUID。 Device-profile ID (UUID).
device_profile_namestring按业务校验Device-profile name.
device_statusapi.DeviceStatus按业务校验终端状态。 Device status.
tagsmap<string, string>按业务校验自定义字符串标签。 Device tags.

api.DeviceListItem.TagsEntry ​

名称类型必填说明
keystring按业务校验消息定义未补充字段说明。
valuestring按业务校验消息定义未补充字段说明。

api.DeviceQueueItem ​

名称类型必填说明
idstring按业务校验资源 ID。 ID (UUID). This is automatically generated on enqueue.
dev_euistring按业务校验终端完整 DevEUI。 Device EUI (EUI64).
confirmedbool按业务校验是否使用确认下行。 Confirmed.
f_portuint32按业务校验应用端口。 FPort (must be > 0). On enqueue and if using a JavaScript codec, this value might be automatically set by the codec function.
databytes按业务校验原始负载字节,JSON 中为 Base64。 Data. Or use the json_object field when a codec has been configured.
objectgoogle.protobuf.Struct按业务校验业务对象,需 codec 处理。 Only use this when a codec has been configured that can encode this object to bytes.
is_pendingbool按业务校验是否处于等待确认状态。 Is pending. This is set by ChirpStack to true when the downlink is pending (e.g. it has been sent, but a confirmation is still pending).
f_cnt_downuint32按业务校验Downlink frame-counter. Do not set this for plain-text data payloads. It will be automatically set by ChirpStack when the payload has been sent as downlink.
is_encryptedbool按业务校验负载是否已经加密。 Is encrypted. This must be set to true if the end-application has already encrypted the data payload. In this case, the f_cnt_down field must be set to the corresponding frame-counter which has been used during the encryption.
expires_atgoogle.protobuf.Timestamp按业务校验过期时间。 Expires at (optional). Expired queue-items will be automatically removed from the queue.

api.DeviceState ​

名称类型必填说明
namestring按业务校验名称。 Name.
valuestring按业务校验Value.

api.DeviceStatus ​

名称类型必填说明
marginint32按业务校验The device margin status -32..32: The demodulation SNR ration in dB
external_power_sourcebool按业务校验是否外接电源。 Device is connected to an external power source.
battery_levelfloat按业务校验电池状态。 Device battery level as a percentage. -1 when the battery level is not available.

api.EnqueueDeviceQueueItemRequest ​

名称类型必填说明
queue_itemapi.DeviceQueueItem按业务校验待加入的下行条目。 Item to enqueue.
flush_queuebool按业务校验是否清空队列。 Flush queue before enqueue.

api.EnqueueDeviceQueueItemResponse ​

名称类型必填说明
idstring按业务校验资源 ID。 ID (UUID).

api.FlushDevNoncesRequest ​

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

api.FlushDeviceQueueRequest ​

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

api.GetDeviceActivationRequest ​

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

api.GetDeviceActivationResponse ​

名称类型必填说明
device_activationapi.DeviceActivation按业务校验终端会话激活参数。 Device activation object.
join_server_contextcommon.JoinServerContext按业务校验Join-Server context. A non-empty value indicatest that ChirpStack does not have access to the AppSKey and that the encryption / decryption of the payloads is the responsibility of the end-application.

api.GetDeviceKeysRequest ​

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

api.GetDeviceKeysResponse ​

名称类型必填说明
device_keysapi.DeviceKeys按业务校验Device-keys object.
created_atgoogle.protobuf.Timestamp按业务校验创建时间。 Created at timestamp.
updated_atgoogle.protobuf.Timestamp按业务校验最后更新时间。 Last update timestamp.

api.GetDeviceLinkMetricsRequest ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
startgoogle.protobuf.Timestamp按业务校验起始时间。 Interval start timestamp.
endgoogle.protobuf.Timestamp按业务校验结束时间。 Interval end timestamp.
aggregationcommon.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3}按业务校验聚合粒度。 Aggregation.

api.GetDeviceLinkMetricsResponse ​

名称类型必填说明
rx_packetscommon.Metric按业务校验Packets received from the device.
gw_rssicommon.Metric按业务校验RSSI (as reported by the gateway(s)).
gw_snrcommon.Metric按业务校验SNR (as reported by the gateway(s)).
rx_packets_per_freqcommon.Metric按业务校验Packets received by frequency.
rx_packets_per_drcommon.Metric按业务校验Packets received by DR.
errorscommon.Metric按业务校验Errors.

api.GetDeviceMetricsRequest ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 DevEUI (EUI64).
startgoogle.protobuf.Timestamp按业务校验起始时间。 Interval start timestamp.
endgoogle.protobuf.Timestamp按业务校验结束时间。 Interval end timestamp.
aggregationcommon.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3}按业务校验聚合粒度。 Aggregation.

api.GetDeviceMetricsResponse ​

名称类型必填说明
metricsmap<string, common.Metric>按业务校验指标集合。
statesmap<string, api.DeviceState>按业务校验消息定义未补充字段说明。

api.GetDeviceMetricsResponse.MetricsEntry ​

名称类型必填说明
keystring按业务校验消息定义未补充字段说明。
valuecommon.Metric按业务校验消息定义未补充字段说明。

api.GetDeviceMetricsResponse.StatesEntry ​

名称类型必填说明
keystring按业务校验消息定义未补充字段说明。
valueapi.DeviceState按业务校验消息定义未补充字段说明。

api.GetDeviceNextFCntDownRequest ​

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

api.GetDeviceNextFCntDownResponse ​

名称类型必填说明
f_cnt_downuint32按业务校验FCntDown.

api.GetDeviceQueueItemsRequest ​

名称类型必填说明
dev_euistring按业务校验终端完整 DevEUI。 Device EUI (EUI64).
count_onlybool按业务校验Return only the count, not the result-set.

api.GetDeviceQueueItemsResponse ​

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

api.GetDeviceRequest ​

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

api.GetDeviceResponse ​

名称类型必填说明
deviceapi.Device按业务校验终端对象。 Device object.
created_atgoogle.protobuf.Timestamp按业务校验创建时间。 Created at timestamp.
updated_atgoogle.protobuf.Timestamp按业务校验最后更新时间。 Last update timestamp.
last_seen_atgoogle.protobuf.Timestamp按业务校验最后上报时间。 Last seen at timestamp.
device_statusapi.DeviceStatus按业务校验终端状态。 Device status.
class_enabledcommon.DeviceClass {CLASS_A=0, CLASS_B=1, CLASS_C=2}按业务校验已启用的 Class。 Enabled device class.

api.GetRandomDevAddrRequest ​

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

api.GetRandomDevAddrResponse ​

名称类型必填说明
dev_addrstring按业务校验会话短地址。 DevAddr.

api.ListDevicesRequest ​

名称类型必填说明
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).
searchstring按业务校验搜索关键字。 If set, the given string will be used to search on name (optional).
application_idstring按业务校验应用 UUID。 Application ID (UUID) to filter devices on.
multicast_group_idstring按业务校验组播组 UUID。 Multicst-group ID (UUID) to filter devices on.
order_byapi.ListDevicesRequest.OrderBy {NAME=0, DEV_EUI=1, LAST_SEEN_AT=2, DEVICE_PROFILE_NAME=3}按业务校验If set, the given value will be used to sort by (optional).
order_by_descbool按业务校验If set, the sorting direction will be decending (default = ascending) (optional).
tagsmap<string, string>按业务校验自定义字符串标签。 Tags to filter devices on.
device_profile_idstring按业务校验终端模版 UUID。 Device-profile ID (UUID) to filter devices on.

api.ListDevicesRequest.TagsEntry ​

名称类型必填说明
keystring按业务校验消息定义未补充字段说明。
valuestring按业务校验消息定义未补充字段说明。

api.ListDevicesResponse ​

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

api.UpdateDeviceKeysRequest ​

名称类型必填说明
device_keysapi.DeviceKeys按业务校验Device-keys object.

api.UpdateDeviceRequest ​

名称类型必填说明
deviceapi.Device按业务校验终端对象。 Device object.

common.JoinServerContext ​

Join-Server context.

名称类型必填说明
session_key_idstring按业务校验Session-key ID.
app_s_keycommon.KeyEnvelope按业务校验应用会话密钥。 AppSKey envelope.

common.KeyEnvelope ​

名称类型必填说明
kek_labelstring按业务校验KEK label.
aes_keybytes按业务校验AES key (when the kek_label is set, this value must first be decrypted).

common.Metric ​

名称类型必填说明
namestring按业务校验名称。 Name.
timestampsrepeated google.protobuf.Timestamp按业务校验Timestamps.
datasetsrepeated common.MetricDataset按业务校验Datasets.
kindcommon.MetricKind {COUNTER=0, ABSOLUTE=1, GAUGE=2}按业务校验Kind.

common.MetricDataset ​

名称类型必填说明
labelstring按业务校验Label.
datarepeated float按业务校验数据序列。 Data. Each value index corresponds with the same timestamp index of the Metric.

设备使用指南