切换深色模式
终端与下行队列 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(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device | api.Device | 按业务校验 | 终端对象。 Device object. |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
Get
接口名称: api.DeviceService/Get
功能: 查询 对应资源。Get returns the device for the given DevEUI.
请求: api.GetDeviceRequest;返回: api.GetDeviceResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device | api.Device | 按业务校验 | 终端对象。 Device object. |
created_at | google.protobuf.Timestamp | 按业务校验 | 创建时间。 Created at timestamp. |
updated_at | google.protobuf.Timestamp | 按业务校验 | 最后更新时间。 Last update timestamp. |
last_seen_at | google.protobuf.Timestamp | 按业务校验 | 最后上报时间。 Last seen at timestamp. |
device_status | api.DeviceStatus | 按业务校验 | 终端状态。 Device status. |
class_enabled | common.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(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device | api.Device | 按业务校验 | 终端对象。 Device object. |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
Delete
接口名称: api.DeviceService/Delete
功能: 删除 对应资源。Delete the device with the given DevEUI.
请求: api.DeleteDeviceRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
返回值
无字段。
操作影响
此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
List
接口名称: api.DeviceService/List
功能: 列出 对应资源。Get the list of devices.
请求: api.ListDevicesRequest;返回: api.ListDevicesResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
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). |
search | string | 按业务校验 | 搜索关键字。 If set, the given string will be used to search on name (optional). |
application_id | string | 按业务校验 | 应用 UUID。 Application ID (UUID) to filter devices on. |
multicast_group_id | string | 按业务校验 | 组播组 UUID。 Multicst-group ID (UUID) to filter devices on. |
order_by | api.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_desc | bool | 按业务校验 | If set, the sorting direction will be decending (default = ascending) (optional). |
tags | map<string, string> | 按业务校验 | 自定义字符串标签。 Tags to filter devices on. |
device_profile_id | string | 按业务校验 | 终端模版 UUID。 Device-profile ID (UUID) to filter devices on. |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of devices. |
result | repeated api.DeviceListItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
CreateKeys
接口名称: api.DeviceService/CreateKeys
功能: 创建终端根密钥。Create the given device-keys.
请求: api.CreateDeviceKeysRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_keys | api.DeviceKeys | 按业务校验 | Device-keys object. |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
GetKeys
接口名称: api.DeviceService/GetKeys
功能: 查询终端根密钥。Get the device-keys for the given DevEUI.
请求: api.GetDeviceKeysRequest;返回: api.GetDeviceKeysResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_keys | api.DeviceKeys | 按业务校验 | Device-keys object. |
created_at | google.protobuf.Timestamp | 按业务校验 | 创建时间。 Created at timestamp. |
updated_at | google.protobuf.Timestamp | 按业务校验 | 最后更新时间。 Last update timestamp. |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
UpdateKeys
接口名称: api.DeviceService/UpdateKeys
功能: 更新终端根密钥。Update the given device-keys.
请求: api.UpdateDeviceKeysRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_keys | api.DeviceKeys | 按业务校验 | Device-keys object. |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
DeleteKeys
接口名称: api.DeviceService/DeleteKeys
功能: 删除终端根密钥。Delete the device-keys for the given DevEUI.
请求: api.DeleteDeviceKeysRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
返回值
无字段。
操作影响
此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
FlushDevNonces
接口名称: api.DeviceService/FlushDevNonces
功能: 清空 DevNonces。FlushDevNonces flushes the OTAA device nonces.
请求: api.FlushDevNoncesRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 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_activation | api.DeviceActivation | 按业务校验 | 终端会话激活参数。 Device activation object. |
返回值
无字段。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
Deactivate
接口名称: api.DeviceService/Deactivate
功能: 停用当前会话。Deactivate de-activates the device.
请求: api.DeactivateDeviceRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 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_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_activation | api.DeviceActivation | 按业务校验 | 终端会话激活参数。 Device activation object. |
join_server_context | common.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_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_addr | string | 按业务校验 | 会话短地址。 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_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
start | google.protobuf.Timestamp | 按业务校验 | 起始时间。 Interval start timestamp. |
end | google.protobuf.Timestamp | 按业务校验 | 结束时间。 Interval end timestamp. |
aggregation | common.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3} | 按业务校验 | 聚合粒度。 Aggregation. |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
metrics | map<string, common.Metric> | 按业务校验 | 指标集合。 |
states | map<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_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
start | google.protobuf.Timestamp | 按业务校验 | 起始时间。 Interval start timestamp. |
end | google.protobuf.Timestamp | 按业务校验 | 结束时间。 Interval end timestamp. |
aggregation | common.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3} | 按业务校验 | 聚合粒度。 Aggregation. |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
rx_packets | common.Metric | 按业务校验 | Packets received from the device. |
gw_rssi | common.Metric | 按业务校验 | RSSI (as reported by the gateway(s)). |
gw_snr | common.Metric | 按业务校验 | SNR (as reported by the gateway(s)). |
rx_packets_per_freq | common.Metric | 按业务校验 | Packets received by frequency. |
rx_packets_per_dr | common.Metric | 按业务校验 | Packets received by DR. |
errors | common.Metric | 按业务校验 | Errors. |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
Enqueue
接口名称: api.DeviceService/Enqueue
功能: 将下行加入队列。Enqueue adds the given item to the downlink queue.
请求: api.EnqueueDeviceQueueItemRequest;返回: api.EnqueueDeviceQueueItemResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
queue_item | api.DeviceQueueItem | 按业务校验 | 待加入的下行条目。 Item to enqueue. |
flush_queue | bool | 按业务校验 | 是否清空队列。 Flush queue before enqueue. |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 按业务校验 | 资源 ID。 ID (UUID). |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
FlushQueue
接口名称: api.DeviceService/FlushQueue
功能: 清空待发队列。FlushQueue flushes the downlink device-queue.
请求: api.FlushDeviceQueueRequest;返回: google.protobuf.Empty(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
返回值
无字段。
操作影响
此方法会删除、清空或重置对应资源/状态。调用前核对目标 ID;请勿通过重试重复执行有副作用的操作。
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
GetQueue
接口名称: api.DeviceService/GetQueue
功能: 查询下行队列。GetQueue returns the downlink device-queue.
请求: api.GetDeviceQueueItemsRequest;返回: api.GetDeviceQueueItemsResponse(单次响应)。
请求参数
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
count_only | bool | 按业务校验 | Return only the count, not the result-set. |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of queue items. |
result | repeated 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_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
返回值
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
f_cnt_down | uint32 | 按业务校验 | FCntDown. |
错误处理:按 统一错误说明 检查 gRPC 状态;本页不将通用状态码冒充每个方法的固定错误集合。
嵌套消息结构
api.ActivateDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_activation | api.DeviceActivation | 按业务校验 | 终端会话激活参数。 Device activation object. |
api.CreateDeviceKeysRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_keys | api.DeviceKeys | 按业务校验 | Device-keys object. |
api.CreateDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device | api.Device | 按业务校验 | 终端对象。 Device object. |
api.DeactivateDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.DeleteDeviceKeysRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.DeleteDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.Device
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
name | string | 按业务校验 | 名称。 Name. |
description | string | 按业务校验 | 描述。 Description. |
application_id | string | 按业务校验 | 应用 UUID。 Application ID (UUID). |
device_profile_id | string | 按业务校验 | 终端模版 UUID。 Device-profile ID (UUID). |
skip_fcnt_check | bool | 按业务校验 | 是否跳过帧计数检查。 Skip frame-counter checks (this is insecure, but could be helpful for debugging). |
is_disabled | bool | 按业务校验 | 是否禁用。 Device is disabled. |
variables | map<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. |
tags | map<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_eui | string | 按业务校验 | 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
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 按业务校验 | 消息定义未补充字段说明。 |
value | string | 按业务校验 | 消息定义未补充字段说明。 |
api.Device.VariablesEntry
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 按业务校验 | 消息定义未补充字段说明。 |
value | string | 按业务校验 | 消息定义未补充字段说明。 |
api.DeviceActivation
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
dev_addr | string | 按业务校验 | 会话短地址。 Device address (HEX encoded). |
app_s_key | string | 按业务校验 | 应用会话密钥。 Application session key (HEX encoded). |
nwk_s_enc_key | string | 按业务校验 | 网络会话加密密钥。 Network session encryption key (HEX encoded). Note: For LoRaWAN 1.0.x devices, set this to the NwkSKey. |
s_nwk_s_int_key | string | 按业务校验 | 服务网络会话完整性密钥。 Serving network session integrity key (HEX encoded). Note: For LoRaWAN 1.0.x devices, set this to the NwkSKey. |
f_nwk_s_int_key | string | 按业务校验 | 转发网络会话完整性密钥。 Forwarding network session integrity key (HEX encoded). Note: For LoRaWAN 1.0.x devices, set this to the NwkSKey. |
f_cnt_up | uint32 | 按业务校验 | 上行帧计数。 Uplink frame-counter. |
n_f_cnt_down | uint32 | 按业务校验 | 网络下行帧计数。 Downlink network frame-counter. |
a_f_cnt_down | uint32 | 按业务校验 | 应用下行帧计数。 Downlink application frame-counter. |
api.DeviceKeys
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
nwk_key | string | 按业务校验 | 网络根密钥。 Network root key (128 bit). Note: For LoRaWAN 1.0.x, use this field for the LoRaWAN 1.0.x 'AppKey`! |
app_key | string | 按业务校验 | 应用根密钥。 Application root key (128 bit). Note: This field only needs to be set for LoRaWAN 1.1.x devices! |
gen_app_key | string | 按业务校验 | 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_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
created_at | google.protobuf.Timestamp | 按业务校验 | 创建时间。 Created at timestamp. |
updated_at | google.protobuf.Timestamp | 按业务校验 | 最后更新时间。 Last update timestamp. |
last_seen_at | google.protobuf.Timestamp | 按业务校验 | 最后上报时间。 Last seen at timestamp. |
name | string | 按业务校验 | 名称。 Name. |
description | string | 按业务校验 | 描述。 Description. |
device_profile_id | string | 按业务校验 | 终端模版 UUID。 Device-profile ID (UUID). |
device_profile_name | string | 按业务校验 | Device-profile name. |
device_status | api.DeviceStatus | 按业务校验 | 终端状态。 Device status. |
tags | map<string, string> | 按业务校验 | 自定义字符串标签。 Device tags. |
api.DeviceListItem.TagsEntry
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 按业务校验 | 消息定义未补充字段说明。 |
value | string | 按业务校验 | 消息定义未补充字段说明。 |
api.DeviceQueueItem
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 按业务校验 | 资源 ID。 ID (UUID). This is automatically generated on enqueue. |
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
confirmed | bool | 按业务校验 | 是否使用确认下行。 Confirmed. |
f_port | uint32 | 按业务校验 | 应用端口。 FPort (must be > 0). On enqueue and if using a JavaScript codec, this value might be automatically set by the codec function. |
data | bytes | 按业务校验 | 原始负载字节,JSON 中为 Base64。 Data. Or use the json_object field when a codec has been configured. |
object | google.protobuf.Struct | 按业务校验 | 业务对象,需 codec 处理。 Only use this when a codec has been configured that can encode this object to bytes. |
is_pending | bool | 按业务校验 | 是否处于等待确认状态。 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_down | uint32 | 按业务校验 | 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_encrypted | bool | 按业务校验 | 负载是否已经加密。 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_at | google.protobuf.Timestamp | 按业务校验 | 过期时间。 Expires at (optional). Expired queue-items will be automatically removed from the queue. |
api.DeviceState
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 按业务校验 | 名称。 Name. |
value | string | 按业务校验 | Value. |
api.DeviceStatus
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
margin | int32 | 按业务校验 | The device margin status -32..32: The demodulation SNR ration in dB |
external_power_source | bool | 按业务校验 | 是否外接电源。 Device is connected to an external power source. |
battery_level | float | 按业务校验 | 电池状态。 Device battery level as a percentage. -1 when the battery level is not available. |
api.EnqueueDeviceQueueItemRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
queue_item | api.DeviceQueueItem | 按业务校验 | 待加入的下行条目。 Item to enqueue. |
flush_queue | bool | 按业务校验 | 是否清空队列。 Flush queue before enqueue. |
api.EnqueueDeviceQueueItemResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 按业务校验 | 资源 ID。 ID (UUID). |
api.FlushDevNoncesRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
api.FlushDeviceQueueRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
api.GetDeviceActivationRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.GetDeviceActivationResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_activation | api.DeviceActivation | 按业务校验 | 终端会话激活参数。 Device activation object. |
join_server_context | common.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_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.GetDeviceKeysResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_keys | api.DeviceKeys | 按业务校验 | Device-keys object. |
created_at | google.protobuf.Timestamp | 按业务校验 | 创建时间。 Created at timestamp. |
updated_at | google.protobuf.Timestamp | 按业务校验 | 最后更新时间。 Last update timestamp. |
api.GetDeviceLinkMetricsRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
start | google.protobuf.Timestamp | 按业务校验 | 起始时间。 Interval start timestamp. |
end | google.protobuf.Timestamp | 按业务校验 | 结束时间。 Interval end timestamp. |
aggregation | common.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3} | 按业务校验 | 聚合粒度。 Aggregation. |
api.GetDeviceLinkMetricsResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
rx_packets | common.Metric | 按业务校验 | Packets received from the device. |
gw_rssi | common.Metric | 按业务校验 | RSSI (as reported by the gateway(s)). |
gw_snr | common.Metric | 按业务校验 | SNR (as reported by the gateway(s)). |
rx_packets_per_freq | common.Metric | 按业务校验 | Packets received by frequency. |
rx_packets_per_dr | common.Metric | 按业务校验 | Packets received by DR. |
errors | common.Metric | 按业务校验 | Errors. |
api.GetDeviceMetricsRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
start | google.protobuf.Timestamp | 按业务校验 | 起始时间。 Interval start timestamp. |
end | google.protobuf.Timestamp | 按业务校验 | 结束时间。 Interval end timestamp. |
aggregation | common.Aggregation {HOUR=0, DAY=1, MONTH=2, MINUTE=3} | 按业务校验 | 聚合粒度。 Aggregation. |
api.GetDeviceMetricsResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
metrics | map<string, common.Metric> | 按业务校验 | 指标集合。 |
states | map<string, api.DeviceState> | 按业务校验 | 消息定义未补充字段说明。 |
api.GetDeviceMetricsResponse.MetricsEntry
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 按业务校验 | 消息定义未补充字段说明。 |
value | common.Metric | 按业务校验 | 消息定义未补充字段说明。 |
api.GetDeviceMetricsResponse.StatesEntry
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 按业务校验 | 消息定义未补充字段说明。 |
value | api.DeviceState | 按业务校验 | 消息定义未补充字段说明。 |
api.GetDeviceNextFCntDownRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
api.GetDeviceNextFCntDownResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
f_cnt_down | uint32 | 按业务校验 | FCntDown. |
api.GetDeviceQueueItemsRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 Device EUI (EUI64). |
count_only | bool | 按业务校验 | Return only the count, not the result-set. |
api.GetDeviceQueueItemsResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of queue items. |
result | repeated api.DeviceQueueItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
api.GetDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.GetDeviceResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device | api.Device | 按业务校验 | 终端对象。 Device object. |
created_at | google.protobuf.Timestamp | 按业务校验 | 创建时间。 Created at timestamp. |
updated_at | google.protobuf.Timestamp | 按业务校验 | 最后更新时间。 Last update timestamp. |
last_seen_at | google.protobuf.Timestamp | 按业务校验 | 最后上报时间。 Last seen at timestamp. |
device_status | api.DeviceStatus | 按业务校验 | 终端状态。 Device status. |
class_enabled | common.DeviceClass {CLASS_A=0, CLASS_B=1, CLASS_C=2} | 按业务校验 | 已启用的 Class。 Enabled device class. |
api.GetRandomDevAddrRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_eui | string | 按业务校验 | 终端完整 DevEUI。 DevEUI (EUI64). |
api.GetRandomDevAddrResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
dev_addr | string | 按业务校验 | 会话短地址。 DevAddr. |
api.ListDevicesRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
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). |
search | string | 按业务校验 | 搜索关键字。 If set, the given string will be used to search on name (optional). |
application_id | string | 按业务校验 | 应用 UUID。 Application ID (UUID) to filter devices on. |
multicast_group_id | string | 按业务校验 | 组播组 UUID。 Multicst-group ID (UUID) to filter devices on. |
order_by | api.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_desc | bool | 按业务校验 | If set, the sorting direction will be decending (default = ascending) (optional). |
tags | map<string, string> | 按业务校验 | 自定义字符串标签。 Tags to filter devices on. |
device_profile_id | string | 按业务校验 | 终端模版 UUID。 Device-profile ID (UUID) to filter devices on. |
api.ListDevicesRequest.TagsEntry
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
key | string | 按业务校验 | 消息定义未补充字段说明。 |
value | string | 按业务校验 | 消息定义未补充字段说明。 |
api.ListDevicesResponse
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
total_count | uint32 | 按业务校验 | 符合条件的总条数。 Total number of devices. |
result | repeated api.DeviceListItem | 按业务校验 | 结果列表或结果内容。 Result-set. |
api.UpdateDeviceKeysRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device_keys | api.DeviceKeys | 按业务校验 | Device-keys object. |
api.UpdateDeviceRequest
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
device | api.Device | 按业务校验 | 终端对象。 Device object. |
common.JoinServerContext
Join-Server context.
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
session_key_id | string | 按业务校验 | Session-key ID. |
app_s_key | common.KeyEnvelope | 按业务校验 | 应用会话密钥。 AppSKey envelope. |
common.KeyEnvelope
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
kek_label | string | 按业务校验 | KEK label. |
aes_key | bytes | 按业务校验 | AES key (when the kek_label is set, this value must first be decrypted). |
common.Metric
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
name | string | 按业务校验 | 名称。 Name. |
timestamps | repeated google.protobuf.Timestamp | 按业务校验 | Timestamps. |
datasets | repeated common.MetricDataset | 按业务校验 | Datasets. |
kind | common.MetricKind {COUNTER=0, ABSOLUTE=1, GAUGE=2} | 按业务校验 | Kind. |
common.MetricDataset
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
label | string | 按业务校验 | Label. |
data | repeated float | 按业务校验 | 数据序列。 Data. Each value index corresponds with the same timestamp index of the Metric. |