Getting Started Concepts The Things Stack Cloud The Things Stack Enterprise Integrations API Hardware
Get The Things Stack

API

    Overview
  • Concepts
  • Reference
    • HTTP(REST)
    • gRPC
      • Application APIs
      • Application Package APIs
      • Application Pub/Sub APIs
      • Application Server APIs
      • Application Webhook APIs
      • Client APIs
      • Crypto Operations APIs
      • End Device APIs
      • Events API
      • Gateway APIs
      • Gateway Server APIs
      • Identity Server APIs
      • Join Server APIs
      • Network Operations Center APIs
      • Network Server APIs
      • Organization APIs
      • Packet Broker APIs
      • Storage Integration API
      • Tenant APIs
      • User APIs

Packet Broker APIs

List of Packet Broker APIs.

The Pba service

Method Pba.DeleteHomeNetworkRoutingPolicy
Description Delete the routing policy for the given Home Network. Deleting routing policies requires administrative access.
Request type PacketBrokerNetworkIdentifier
Response type google.protobuf.Empty
HTTP bindings

DELETE /api/v3/pba/home-networks/policies/{net_id}

DELETE /api/v3/pba/home-networks/policies/{net_id}/{tenant_id}

Method Pba.DeleteHomeNetworkDefaultRoutingPolicy
Description Deletes the default routing policy. Deleting routing policies requires administrative access.
Request type google.protobuf.Empty
Response type google.protobuf.Empty
HTTP bindings

DELETE /api/v3/pba/home-networks/policies/default

Method Pba.DeleteHomeNetworkDefaultGatewayVisibility
Description Deletes the default gateway visibility. Deleting gateway visibilities requires administrative access.
Request type google.protobuf.Empty
Response type google.protobuf.Empty
HTTP bindings

DELETE /api/v3/pba/home-networks/gateway-visibilities/default

Method Pba.Deregister
Description Deregister from Packet Broker. Packet Broker deregistration requires administrative access. Packet Broker deregistration is only supported for tenants and requires Packet Broker Agent to be configured with NetID level authentication. Use rpc GetInfo and check register_enabled to check whether this rpc is enabled.
Request type google.protobuf.Empty
Response type google.protobuf.Empty
HTTP bindings

DELETE /api/v3/pba/registration

Method Pba.GetInfo
Description Get information about the Packet Broker registration. Viewing Packet Packet information requires administrative access.
Request type google.protobuf.Empty
Response type PacketBrokerInfo
HTTP bindings

GET /api/v3/pba/info

Method Pba.GetHomeNetworkRoutingPolicy
Description Get the routing policy for the given Home Network. Getting routing policies requires administrative access.
Request type PacketBrokerNetworkIdentifier
Response type PacketBrokerRoutingPolicy
HTTP bindings

GET /api/v3/pba/home-networks/policies/{net_id}

GET /api/v3/pba/home-networks/policies/{net_id}/{tenant_id}

Method Pba.GetHomeNetworkDefaultRoutingPolicy
Description Get the default routing policy. Getting routing policies requires administrative access.
Request type google.protobuf.Empty
Response type PacketBrokerDefaultRoutingPolicy
HTTP bindings

GET /api/v3/pba/home-networks/policies/default

Method Pba.GetHomeNetworkDefaultGatewayVisibility
Description Get the default gateway visibility. Getting gateway visibilities requires administrative access.
Request type google.protobuf.Empty
Response type PacketBrokerDefaultGatewayVisibility
HTTP bindings

GET /api/v3/pba/home-networks/gateway-visibilities/default

Method Pba.ListNetworks
Description List all listed networks. Listing networks requires administrative access.
Request type ListPacketBrokerNetworksRequest
Response type PacketBrokerNetworks
HTTP bindings

GET /api/v3/pba/networks

Method Pba.ListHomeNetworks
Description List the listed home networks for which routing policies can be configured. Listing home networks requires administrative access.
Request type ListPacketBrokerHomeNetworksRequest
Response type PacketBrokerNetworks
HTTP bindings

GET /api/v3/pba/home-networks

Method Pba.ListForwarderRoutingPolicies
Description List the routing policies that Forwarders configured with Packet Broker Agent as Home Network. Listing routing policies requires administrative access.
Request type ListForwarderRoutingPoliciesRequest
Response type PacketBrokerRoutingPolicies
HTTP bindings

GET /api/v3/pba/forwarders/policies

Method Pba.ListHomeNetworkRoutingPolicies
Description List the routing policies that Packet Broker Agent as Forwarder configured with Home Networks. Listing routing policies requires administrative access.
Request type ListHomeNetworkRoutingPoliciesRequest
Response type PacketBrokerRoutingPolicies
HTTP bindings

GET /api/v3/pba/home-networks/policies

Method Pba.Register
Description Register with Packet Broker. If no registration exists, it will be created. Any existing registration will be updated. Registration settings not in the request message are taken from Packet Broker Agent configuration and caller context. Packet Broker registration requires administrative access. Packet Broker registration is only supported for tenants and requires Packet Broker Agent to be configured with NetID level authentication. Use rpc GetInfo and check register_enabled to check whether this rpc is enabled.
Request type PacketBrokerRegisterRequest
Response type PacketBrokerNetwork
HTTP bindings

PUT /api/v3/pba/registration

POST /api/v3/pba/registration

Method Pba.SetHomeNetworkRoutingPolicy
Description Set the routing policy for the given Home Network. Setting routing policies requires administrative access.
Request type SetPacketBrokerRoutingPolicyRequest
Response type google.protobuf.Empty
HTTP bindings

PUT /api/v3/pba/home-networks/policies/{home_network_id.net_id}

POST /api/v3/pba/home-networks/policies/{home_network_id.net_id}

PUT /api/v3/pba/home-networks/policies/{home_network_id.net_id}/{home_network_id.tenant_id}

POST /api/v3/pba/home-networks/policies/{home_network_id.net_id}/{home_network_id.tenant_id}

Method Pba.SetHomeNetworkDefaultRoutingPolicy
Description Set the default routing policy. Setting routing policies requires administrative access.
Request type SetPacketBrokerDefaultRoutingPolicyRequest
Response type google.protobuf.Empty
HTTP bindings

PUT /api/v3/pba/home-networks/policies/default

POST /api/v3/pba/home-networks/policies/default

Method Pba.SetHomeNetworkDefaultGatewayVisibility
Description Set the default gateway visibility. Setting gateway visibilities requires administrative access.
Request type SetPacketBrokerDefaultGatewayVisibilityRequest
Response type google.protobuf.Empty
HTTP bindings

PUT /api/v3/pba/home-networks/gateway-visibilities/default

POST /api/v3/pba/home-networks/gateway-visibilities/default

The GsPba service

Method GsPba.PublishUplink
Request type GatewayUplinkMessage
Response type google.protobuf.Empty
HTTP bindings
Method GsPba.UpdateGateway
Description Update the gateway, changing the fields specified by the field mask to the provided values. To mark a gateway as online, call this rpc setting online to true, include status_public in field_mask and keep calling this rpc before the returned online_ttl passes to keep the gateway online.
Request type UpdatePacketBrokerGatewayRequest
Response type UpdatePacketBrokerGatewayResponse
HTTP bindings

Messages

Message CFList

Show object example
{
  "type": "FREQUENCIES",
  "freq": [],
  "ch_masks": [],
}

Fields:

Field type
Type CFListType
Description

defined_only

Field freq
Type repeated uint32
Description

Frequencies to be broadcasted, in hecto-Hz. These values are broadcasted as 24 bits unsigned integers. This field should not contain default values.

Field ch_masks
Type repeated bool
Description

ChMasks controlling the channels to be used. Length of this field must be equal to the amount of uplink channels defined by the selected frequency plan.

Message ContactInfo

Show object example
{
  "contact_type": "CONTACT_TYPE_OTHER",
  "contact_method": "CONTACT_METHOD_OTHER",
  "value": "",
  "public": false,
  "validated_at": "0001-01-01T00:00:00Z",
}

Fields:

Field contact_type
Type ContactType
Description

defined_only

Field contact_method
Type ContactMethod
Description

defined_only

Field value
Type string
Description

max_len: 256

Field public
Type bool
Field validated_at
Type google.protobuf. Timestamp

Message DataRate

Restrictions:
  • Only one of lora, fsk, lrfhss can be set.
Show object example
{
  "lora": {},
  "fsk": {},
  "lrfhss": {},
}

Fields:

Field lora
Type LoRaDataRate
Field fsk
Type FSKDataRate
Field lrfhss
Type LRFHSSDataRate

Message DLSettings

Show object example
{
  "rx1_dr_offset": "DATA_RATE_OFFSET_0",
  "rx2_dr": "DATA_RATE_0",
  "opt_neg": false,
}

Fields:

Field rx1_dr_offset
Type DataRateOffset
Description

defined_only

Field rx2_dr
Type DataRateIndex
Description

defined_only

Field opt_neg
Type bool
Description

OptNeg is set if Network Server implements LoRaWAN 1.1 or greater.

Message GatewayAntenna

GatewayAntenna is the message that defines a gateway antenna.

Show object example
{
  "gain": 0,
  "location": {},
  "attributes": {},
  "placement": "PLACEMENT_UNKNOWN",
}

Fields:

Field gain
Type float
Description

Antenna gain relative to the gateway, in dBi.

Field location
Type Location
Description

location is the antenna’s location.

Field attributes
Type map of string to string
Description

max_pairs: 10

max_len (key): 36

pattern (key): ^[a-z0-9](?:[-]?[a-z0-9]){2,}$

max_len (value): 200

Field placement
Type GatewayAntennaPlacement

Message GatewayIdentifiers

Show object example
{
  "gateway_id": "",
  "eui": "",
}

Fields:

Field gateway_id
Type string
Description

max_len: 36

pattern: ^[a-z0-9](?:[-]?[a-z0-9]){2,}$

Field eui
Type bytes
Description

Secondary identifier, which can only be used in specific requests.

ignore_empty

len: 8

Message GatewayUplinkMessage

Show object example
{
  "message": {},
  "band_id": "",
}

Fields:

Field message
Type UplinkMessage
Description

required

Field band_id
Type string
Description

LoRaWAN band ID of the gateway.

Message JoinAcceptPayload

Show object example
{
  "encrypted": "",
  "join_nonce": "",
  "net_id": "",
  "dev_addr": "",
  "dl_settings": {},
  "rx_delay": "RX_DELAY_0",
  "cf_list": {},
}

Fields:

Field encrypted
Type bytes
Field join_nonce
Type bytes
Description

ignore_empty

len: 3

Field net_id
Type bytes
Description

ignore_empty

len: 3

Field dev_addr
Type bytes
Description

ignore_empty

len: 4

Field dl_settings
Type DLSettings
Description

required

Field rx_delay
Type RxDelay
Description

defined_only

Field cf_list
Type CFList

Message JoinRequestPayload

Show object example
{
  "join_eui": "",
  "dev_eui": "",
  "dev_nonce": "",
}

Fields:

Field join_eui
Type bytes
Description

ignore_empty

len: 8

Field dev_eui
Type bytes
Description

ignore_empty

len: 8

Field dev_nonce
Type bytes
Description

ignore_empty

len: 2

Message Location

Show object example
{
  "latitude": 0,
  "longitude": 0,
  "altitude": 0,
  "accuracy": 0,
  "source": "SOURCE_UNKNOWN",
}

Fields:

Field latitude
Type double
Description

The North–South position (degrees; -90 to +90), where 0 is the equator, North pole is positive, South pole is negative.

gte: -90

lte: 90

Field longitude
Type double
Description

The East-West position (degrees; -180 to +180), where 0 is the Prime Meridian (Greenwich), East is positive , West is negative.

gte: -180

lte: 180

Field altitude
Type int32
Description

The altitude (meters), where 0 is the mean sea level.

Field accuracy
Type int32
Description

The accuracy of the location (meters).

Field source
Type LocationSource
Description

Source of the location information.

defined_only

Message ListPacketBrokerNetworksRequest

Show object example
{
  "limit": 0,
  "page": 0,
  "with_routing_policy": false,
  "tenant_id_contains": "",
  "name_contains": "",
}

Fields:

Field limit
Type uint32
Description

Limit the number of results per page.

lte: 1000

Field page
Type uint32
Description

Page number for pagination. 0 is interpreted as 1.

Field with_routing_policy
Type bool
Description

If true, list only the Forwarders and Home Networks with whom a routing policy has been defined in either direction.

Field tenant_id_contains
Type string
Description

Filter by tenant ID.

max_len: 100

Field name_contains
Type string
Description

Filter by name.

max_len: 100

Message ListPacketBrokerHomeNetworksRequest

Show object example
{
  "limit": 0,
  "page": 0,
  "tenant_id_contains": "",
  "name_contains": "",
}

Fields:

Field limit
Type uint32
Description

Limit the number of results per page.

lte: 1000

Field page
Type uint32
Description

Page number for pagination. 0 is interpreted as 1.

Field tenant_id_contains
Type string
Description

Filter by tenant ID.

max_len: 100

Field name_contains
Type string
Description

Filter by name.

max_len: 100

Message ListForwarderRoutingPoliciesRequest

Show object example
{
  "home_network_id": {},
  "limit": 0,
  "page": 0,
}

Fields:

Field home_network_id
Type PacketBrokerNetworkIdentifier
Description

Packet Broker identifier of the Home Network.

Field limit
Type uint32
Description

Limit the number of results per page.

Field page
Type uint32
Description

Page number for pagination. 0 is interpreted as 1.

Message ListHomeNetworkRoutingPoliciesRequest

Show object example
{
  "limit": 0,
  "page": 0,
}

Fields:

Field limit
Type uint32
Description

Limit the number of results per page.

lte: 1000

Field page
Type uint32
Description

Page number for pagination. 0 is interpreted as 1.

Message FCtrl

Show object example
{
  "adr": false,
  "adr_ack_req": false,
  "ack": false,
  "f_pending": false,
  "class_b": false,
}

Fields:

Field adr
Type bool
Field adr_ack_req
Type bool
Description

Only on uplink.

Field ack
Type bool
Field f_pending
Type bool
Description

Only on downlink.

Field class_b
Type bool
Description

Only on uplink.

Message FSKDataRate

Show object example
{
  "bit_rate": 0,
}

Fields:

Field bit_rate
Type uint32
Description

Bit rate (bps).

Message FHDR

Show object example
{
  "dev_addr": "",
  "f_ctrl": {},
  "f_cnt": 0,
  "f_opts": "",
}

Fields:

Field dev_addr
Type bytes
Description

ignore_empty

len: 4

Field f_ctrl
Type FCtrl
Description

required

Field f_cnt
Type uint32
Description

lte: 65535

Field f_opts
Type bytes
Description

max_len: 15

Message LoRaDataRate

Show object example
{
  "bandwidth": 0,
  "spreading_factor": 0,
  "coding_rate": "",
}

Fields:

Field bandwidth
Type uint32
Description

Bandwidth (Hz).

Field spreading_factor
Type uint32
Field coding_rate
Type string

Message LRFHSSDataRate

Show object example
{
  "modulation_type": 0,
  "operating_channel_width": 0,
  "coding_rate": "",
}

Fields:

Field modulation_type
Type uint32
Field operating_channel_width
Type uint32
Description

Operating Channel Width (Hz).

Field coding_rate
Type string

Message MACPayload

Show object example
{
  "f_hdr": {},
  "f_port": 0,
  "frm_payload": "",
  "decoded_payload": {},
  "full_f_cnt": 0,
}

Fields:

Field f_hdr
Type FHDR
Description

required

Field f_port
Type uint32
Description

lte: 255

Field frm_payload
Type bytes
Field decoded_payload
Type google.protobuf. Struct
Field full_f_cnt
Type uint32
Description

Full 32-bit FCnt value. Used internally by Network Server.

Message Message

Message represents a LoRaWAN message

Restrictions:
  • Only one of mac_payload, join_request_payload, join_accept_payload, rejoin_request_payload can be set.
Show object example
{
  "m_hdr": {},
  "mic": "",
  "mac_payload": {},
  "join_request_payload": {},
  "join_accept_payload": {},
  "rejoin_request_payload": {},
}

Fields:

Field m_hdr
Type MHDR
Description

required

Field mic
Type bytes
Description

max_len: 4

Field mac_payload
Type MACPayload
Field join_request_payload
Type JoinRequestPayload
Field join_accept_payload
Type JoinAcceptPayload
Field rejoin_request_payload
Type RejoinRequestPayload

Message MHDR

Show object example
{
  "m_type": "JOIN_REQUEST",
  "major": "LORAWAN_R1",
}

Fields:

Field m_type
Type MType
Description

defined_only

Field major
Type Major
Description

defined_only

Message OrganizationOrUserIdentifiers

OrganizationOrUserIdentifiers contains either organization or user identifiers.

Restrictions:
  • Only one of organization_ids, user_ids can be set.
Show object example
{
  "organization_ids": {},
  "user_ids": {},
}

Fields:

Field organization_ids
Type OrganizationIdentifiers
Field user_ids
Type UserIdentifiers

Message OrganizationIdentifiers

Show object example
{
  "organization_id": "",
}

Fields:

Field organization_id
Type string
Description

This ID shares namespace with user IDs.

max_len: 36

pattern: ^[a-z0-9](?:[-]?[a-z0-9]){2,}$

Message PacketBrokerGateway

Gateway respresentation for Packet Broker. This is a subset and superset of the Gateway message using the same data types and field tags to achieve initial wire compatibility. There is no (longer) wire compatibility needed; new fields may use any tag.

Show object example
{
  "ids": {},
  "contact_info": [],
  "administrative_contact": {},
  "technical_contact": {},
  "antennas": [],
  "status_public": false,
  "location_public": false,
  "frequency_plan_ids": [],
  "update_location_from_status": false,
  "online": false,
  "rx_rate": null,
  "tx_rate": null,
}

Fields:

Field ids
Type PacketBrokerGateway.GatewayIdentifiers
Description

required

Field contact_info
Type repeated ContactInfo
Description

This field is deprecated. Use administrative_contact and technical_contact instead.

max_items: 10

Field administrative_contact
Type OrganizationOrUserIdentifiers
Field technical_contact
Type OrganizationOrUserIdentifiers
Field antennas
Type repeated GatewayAntenna
Description

max_items: 8

Field status_public
Type bool
Field location_public
Type bool
Field frequency_plan_ids
Type repeated string
Description

max_items: 8

max_len: 64

Field update_location_from_status
Type bool
Field online
Type bool
Field rx_rate
Type google.protobuf. FloatValue
Description

Received packets rate (number of packets per hour). This field gets updated when a value is set.

Field tx_rate
Type google.protobuf. FloatValue
Description

Transmitted packets rate (number of packets per hour). This field gets updated when a value is set.

Message PacketBrokerGateway

Gateway respresentation for Packet Broker. This is a subset and superset of the Gateway message using the same data types and field tags to achieve initial wire compatibility. There is no (longer) wire compatibility needed; new fields may use any tag.

Show object example
{
  "ids": {},
  "contact_info": [],
  "administrative_contact": {},
  "technical_contact": {},
  "antennas": [],
  "status_public": false,
  "location_public": false,
  "frequency_plan_ids": [],
  "update_location_from_status": false,
  "online": false,
  "rx_rate": null,
  "tx_rate": null,
}

Fields:

Field ids
Type PacketBrokerGateway.GatewayIdentifiers
Description

required

Field contact_info
Type repeated ContactInfo
Description

This field is deprecated. Use administrative_contact and technical_contact instead.

max_items: 10

Field administrative_contact
Type OrganizationOrUserIdentifiers
Field technical_contact
Type OrganizationOrUserIdentifiers
Field antennas
Type repeated GatewayAntenna
Description

max_items: 8

Field status_public
Type bool
Field location_public
Type bool
Field frequency_plan_ids
Type repeated string
Description

max_items: 8

max_len: 64

Field update_location_from_status
Type bool
Field online
Type bool
Field rx_rate
Type google.protobuf. FloatValue
Description

Received packets rate (number of packets per hour). This field gets updated when a value is set.

Field tx_rate
Type google.protobuf. FloatValue
Description

Transmitted packets rate (number of packets per hour). This field gets updated when a value is set.

Message PacketBrokerGateway.GatewayIdentifiers

Show object example
{
  "gateway_id": "",
  "eui": "",
}

Fields:

Field gateway_id
Type string
Description

max_len: 36

pattern: ^[a-z0-9](?:[_-]?[a-z0-9]){2,}$

Field eui
Type bytes
Description

ignore_empty

len: 8

Message PacketBrokerRegisterRequest

Show object example
{
  "listed": null,
}

Fields:

Field listed
Type google.protobuf. BoolValue
Description

Whether the network should be listed in Packet Broker. If unset, the value is taken from the registration settings.

Message PacketBrokerNetworkIdentifier

Show object example
{
  "net_id": 0,
  "tenant_id": "",
}

Fields:

Field net_id
Type uint32
Description

LoRa Alliance NetID.

Field tenant_id
Type string
Description

Tenant identifier if the registration leases DevAddr blocks from a NetID.

max_len: 36

pattern: ^[a-z0-9](?:[-]?[a-z0-9]){2,}$|^$

Message PacketBrokerMetadata

Show object example
{
  "message_id": "",
  "forwarder_net_id": "",
  "forwarder_tenant_id": "",
  "forwarder_cluster_id": "",
  "forwarder_gateway_eui": "",
  "forwarder_gateway_id": null,
  "home_network_net_id": "",
  "home_network_tenant_id": "",
  "home_network_cluster_id": "",
  "hops": [],
}

Fields:

Field message_id
Type string
Description

Message identifier generated by Packet Broker Router.

Field forwarder_net_id
Type bytes
Description

LoRa Alliance NetID of the Packet Broker Forwarder Member.

ignore_empty

len: 3

Field forwarder_tenant_id
Type string
Description

Tenant ID managed by the Packet Broker Forwarder Member.

Field forwarder_cluster_id
Type string
Description

Forwarder Cluster ID of the Packet Broker Forwarder.

Field forwarder_gateway_eui
Type bytes
Description

Forwarder gateway EUI.

ignore_empty

len: 8

Field forwarder_gateway_id
Type google.protobuf. StringValue
Description

Forwarder gateway ID.

Field home_network_net_id
Type bytes
Description

LoRa Alliance NetID of the Packet Broker Home Network Member.

ignore_empty

len: 3

Field home_network_tenant_id
Type string
Description

Tenant ID managed by the Packet Broker Home Network Member. This value is empty if it cannot be determined by the Packet Broker Router.

Field home_network_cluster_id
Type string
Description

Home Network Cluster ID of the Packet Broker Home Network.

Field hops
Type repeated PacketBrokerRouteHop
Description

Hops that the message passed. Each Packet Broker Router service appends an entry.

Message PacketBrokerRouteHop

Show object example
{
  "received_at": "0001-01-01T00:00:00Z",
  "sender_name": "",
  "sender_address": "",
  "receiver_name": "",
  "receiver_agent": "",
}

Fields:

Field received_at
Type google.protobuf. Timestamp
Description

Time when the service received the message.

Field sender_name
Type string
Description

Sender of the message, typically the authorized client identifier.

Field sender_address
Type string
Description

Sender IP address or host name.

Field receiver_name
Type string
Description

Receiver of the message.

Field receiver_agent
Type string
Description

Receiver agent.

Message PacketBrokerRoutingPolicyUplink

Show object example
{
  "join_request": false,
  "mac_data": false,
  "application_data": false,
  "signal_quality": false,
  "localization": false,
}

Fields:

Field join_request
Type bool
Description

Forward join-request messages.

Field mac_data
Type bool
Description

Forward uplink messages with FPort of 0.

Field application_data
Type bool
Description

Forward uplink messages with FPort between 1 and 255.

Field signal_quality
Type bool
Description

Forward RSSI and SNR.

Field localization
Type bool
Description

Forward gateway location, RSSI, SNR and fine timestamp.

Message PacketBrokerRoutingPolicyDownlink

Show object example
{
  "join_accept": false,
  "mac_data": false,
  "application_data": false,
}

Fields:

Field join_accept
Type bool
Description

Allow join-accept messages.

Field mac_data
Type bool
Description

Allow downlink messages with FPort of 0.

Field application_data
Type bool
Description

Allow downlink messages with FPort between 1 and 255.

Message PacketBrokerGatewayVisibility

Show object example
{
  "location": false,
  "antenna_placement": false,
  "antenna_count": false,
  "fine_timestamps": false,
  "contact_info": false,
  "status": false,
  "frequency_plan": false,
  "packet_rates": false,
}

Fields:

Field location
Type bool
Description

Show location.

Field antenna_placement
Type bool
Description

Show antenna placement (indoor/outdoor).

Field antenna_count
Type bool
Description

Show antenna count.

Field fine_timestamps
Type bool
Description

Show whether the gateway produces fine timestamps.

Field contact_info
Type bool
Description

Show contact information.

Field status
Type bool
Description

Show status (online/offline).

Field frequency_plan
Type bool
Description

Show frequency plan.

Field packet_rates
Type bool
Description

Show receive and transmission packet rates.

Message RejoinRequestPayload

Show object example
{
  "rejoin_type": "CONTEXT",
  "net_id": "",
  "join_eui": "",
  "dev_eui": "",
  "rejoin_cnt": 0,
}

Fields:

Field rejoin_type
Type RejoinRequestType
Description

defined_only

Field net_id
Type bytes
Description

ignore_empty

len: 3

Field join_eui
Type bytes
Description

ignore_empty

len: 8

Field dev_eui
Type bytes
Description

ignore_empty

len: 8

Field rejoin_cnt
Type uint32
Description

Contains RJCount0 or RJCount1 depending on rejoin_type.

Message RelayMetadata

Show object example
{
  "device_id": "",
  "wor_channel": "RELAY_WOR_CHANNEL_DEFAULT",
}

Fields:

Field device_id
Type string
Description

End device identifiers of the relay.

max_len: 36

pattern: ^[a-z0-9](?:[-]?[a-z0-9]){2,}$

Field wor_channel
Type RelayWORChannel
Description

Wake on radio channel.

defined_only

Message RxMetadata

Contains metadata for a received message. Each antenna that receives a message corresponds to one RxMetadata.

Show object example
{
  "gateway_ids": {},
  "packet_broker": {},
  "relay": {},
  "antenna_index": 0,
  "time": "0001-01-01T00:00:00Z",
  "timestamp": 0,
  "fine_timestamp": 0,
  "encrypted_fine_timestamp": "",
  "encrypted_fine_timestamp_key_id": "",
  "rssi": 0,
  "signal_rssi": null,
  "channel_rssi": 0,
  "rssi_standard_deviation": 0,
  "snr": 0,
  "frequency_offset": 0,
  "location": {},
  "downlink_path_constraint": "DOWNLINK_PATH_CONSTRAINT_NONE",
  "uplink_token": "",
  "channel_index": 0,
  "hopping_width": 0,
  "frequency_drift": 0,
  "gps_time": "0001-01-01T00:00:00Z",
  "received_at": "0001-01-01T00:00:00Z",
  "advanced": {},
}

Fields:

Field gateway_ids
Type GatewayIdentifiers
Description

required

Field packet_broker
Type PacketBrokerMetadata
Field relay
Type RelayMetadata
Field antenna_index
Type uint32
Field time
Type google.protobuf. Timestamp
Description

Timestamp at the end of the transmission, provided by the gateway. The accuracy is undefined.

Field timestamp
Type uint32
Description

Gateway concentrator timestamp when the Rx finished (microseconds).

Field fine_timestamp
Type uint64
Description

Gateway’s internal fine timestamp when the Rx finished (nanoseconds).

Field encrypted_fine_timestamp
Type bytes
Description

Encrypted gateway’s internal fine timestamp when the Rx finished (nanoseconds).

Field encrypted_fine_timestamp_key_id
Type string
Field rssi
Type float
Description

Received signal strength indicator (dBm). This value equals channel_rssi.

Field signal_rssi
Type google.protobuf. FloatValue
Description

Received signal strength indicator of the signal (dBm).

Field channel_rssi
Type float
Description

Received signal strength indicator of the channel (dBm).

Field rssi_standard_deviation
Type float
Description

Standard deviation of the RSSI during preamble.

Field snr
Type float
Description

Signal-to-noise ratio (dB).

Field frequency_offset
Type int64
Description

Frequency offset (Hz).

Field location
Type Location
Description

Antenna location; injected by the Gateway Server.

Field downlink_path_constraint
Type DownlinkPathConstraint
Description

Gateway downlink path constraint; injected by the Gateway Server.

defined_only

Field uplink_token
Type bytes
Description

Uplink token to be included in the Tx request in class A downlink; injected by gateway, Gateway Server or fNS.

Field channel_index
Type uint32
Description

Index of the gateway channel that received the message.

lte: 255

Field hopping_width
Type uint32
Description

Hopping width; a number describing the number of steps of the LR-FHSS grid.

Field frequency_drift
Type int32
Description

Frequency drift in Hz between start and end of an LR-FHSS packet (signed).

Field gps_time
Type google.protobuf. Timestamp
Description

Timestamp at the end of the transmission, provided by the gateway. Guaranteed to be based on a GPS PPS signal, with an accuracy of 1 millisecond.

Field received_at
Type google.protobuf. Timestamp
Description

Timestamp at which the Gateway Server has received the message.

Field advanced
Type google.protobuf. Struct
Description

Advanced metadata fields

  • can be used for advanced information or experimental features that are not yet formally defined in the API
  • field names are written in snake_case

Message SetPacketBrokerRoutingPolicyRequest

Show object example
{
  "home_network_id": {},
  "uplink": {},
  "downlink": {},
}

Fields:

Field home_network_id
Type PacketBrokerNetworkIdentifier
Description

Packet Broker identifier of the Home Network.

Field uplink
Type PacketBrokerRoutingPolicyUplink
Description

Uplink policy.

required

Field downlink
Type PacketBrokerRoutingPolicyDownlink
Description

Downlink policy.

required

Message SetPacketBrokerDefaultRoutingPolicyRequest

Show object example
{
  "uplink": {},
  "downlink": {},
}

Fields:

Field uplink
Type PacketBrokerRoutingPolicyUplink
Description

Uplink policy.

required

Field downlink
Type PacketBrokerRoutingPolicyDownlink
Description

Downlink policy.

required

Message SetPacketBrokerDefaultGatewayVisibilityRequest

Show object example
{
  "visibility": {},
}

Fields:

Field visibility
Type PacketBrokerGatewayVisibility
Description

required

Message TxSettings

TxSettings contains the settings for a transmission. This message is used on both uplink and downlink. On downlink, this is a scheduled transmission.

Show object example
{
  "data_rate": {},
  "frequency": 0,
  "enable_crc": false,
  "timestamp": 0,
  "time": "0001-01-01T00:00:00Z",
  "downlink": {},
  "concentrator_timestamp": 0,
}

Fields:

Field data_rate
Type DataRate
Description

Data rate.

required

Field frequency
Type uint64
Description

Frequency (Hz).

gte: 100000

Field enable_crc
Type bool
Description

Send a CRC in the packet; only on uplink; on downlink, CRC should not be enabled.

Field timestamp
Type uint32
Description

Timestamp of the gateway concentrator when the uplink message was received, or when the downlink message should be transmitted (microseconds). On downlink, set timestamp to 0 and time to null to use immediate scheduling.

Field time
Type google.protobuf. Timestamp
Description

Time of the gateway when the uplink message was received, or when the downlink message should be transmitted. For downlink, this requires the gateway to have GPS time synchronization.

Field downlink
Type TxSettings.Downlink
Description

Transmission settings for downlink.

Field concentrator_timestamp
Type int64
Description

Concentrator timestamp for the downlink as calculated by the Gateway Server scheduler. This value takes into account necessary offsets such as the RTT (Round Trip Time) and TOA (Time Of Arrival). This field is set and used only by the Gateway Server.

Message TxSettings.Downlink

Transmission settings for downlink.

Show object example
{
  "antenna_index": 0,
  "tx_power": 0,
  "invert_polarization": false,
}

Fields:

Field antenna_index
Type uint32
Description

Index of the antenna on which the uplink was received and/or downlink must be sent.

Field tx_power
Type float
Description

Transmission power (dBm). Only on downlink.

Field invert_polarization
Type bool
Description

Invert LoRa polarization; false for LoRaWAN uplink, true for downlink.

Message UplinkMessage

Uplink message from the end device to the network

Show object example
{
  "raw_payload": "",
  "payload": {},
  "settings": {},
  "rx_metadata": [],
  "received_at": "0001-01-01T00:00:00Z",
  "correlation_ids": [],
  "device_channel_index": 0,
  "consumed_airtime": "0s",
  "crc_status": null,
}

Fields:

Field raw_payload
Type bytes
Field payload
Type Message
Field settings
Type TxSettings
Description

required

Field rx_metadata
Type repeated RxMetadata
Description
Field received_at
Type google.protobuf. Timestamp
Description

Server time when a component received the message. The Gateway Server and Network Server set this value to their local server time of reception.

Field correlation_ids
Type repeated string
Description

max_len: 100

Field device_channel_index
Type uint32
Description

Index of the device channel that received the message. Set by Network Server.

lte: 255

Field consumed_airtime
Type google.protobuf. Duration
Description

Consumed airtime for the transmission of the uplink message. Calculated by Network Server using the RawPayload size and the transmission settings.

Field crc_status
Type google.protobuf. BoolValue
Description

Cyclic Redundancy Check (CRC) status of demodulating the frame. If unset, the modulation does not support CRC or the gateway did not provide a CRC status. If set to false, this message should not be processed.

Message UpdatePacketBrokerGatewayRequest

Show object example
{
  "gateway": {},
  "field_mask": {},
}

Fields:

Field gateway
Type PacketBrokerGateway
Description

required

Field field_mask
Type google.protobuf. FieldMask
Description

The names of the gateway fields that are considered for update.

Online status is only updated if status_public is set. If status_public is set and false, the status will be reset. If status_public is set and true, the online status is taken from the online field. The return message contains the duration online_ttl for how long the gateway is considered online.

Location is only updated if location_public is set. If location_public is set and false, the location will be reset. If location_public is set and true, the first antenna location will be used as gateway location.

Message UpdatePacketBrokerGatewayResponse

Show object example
{
  "online_ttl": "0s",
}

Fields:

Field online_ttl
Type google.protobuf. Duration
Description

Time to live of the online status.

Message UserIdentifiers

Show object example
{
  "user_id": "",
  "email": "",
}

Fields:

Field user_id
Type string
Description

This ID shares namespace with organization IDs.

max_len: 36

pattern: ^[a-z0-9](?:[-]?[a-z0-9]){1,}$

Field email
Type string
Description

Secondary identifier, which can only be used in specific requests.

Enums

Enum CFListType

Name Value Description
FREQUENCIES 0
CHANNEL_MASKS 1

Enum ContactType

Name Value Description
CONTACT_TYPE_OTHER 0
CONTACT_TYPE_ABUSE 1
CONTACT_TYPE_BILLING 2
CONTACT_TYPE_TECHNICAL 3

Enum ContactMethod

Name Value Description
CONTACT_METHOD_OTHER 0
CONTACT_METHOD_EMAIL 1
CONTACT_METHOD_PHONE 2

Enum DataRateOffset

Name Value Description
DATA_RATE_OFFSET_0 0
DATA_RATE_OFFSET_1 1
DATA_RATE_OFFSET_2 2
DATA_RATE_OFFSET_3 3
DATA_RATE_OFFSET_4 4
DATA_RATE_OFFSET_5 5
DATA_RATE_OFFSET_6 6
DATA_RATE_OFFSET_7 7

Enum DataRateIndex

Name Value Description
DATA_RATE_0 0
DATA_RATE_1 1
DATA_RATE_2 2
DATA_RATE_3 3
DATA_RATE_4 4
DATA_RATE_5 5
DATA_RATE_6 6
DATA_RATE_7 7
DATA_RATE_8 8
DATA_RATE_9 9
DATA_RATE_10 10
DATA_RATE_11 11
DATA_RATE_12 12
DATA_RATE_13 13
DATA_RATE_14 14
DATA_RATE_15 15

Enum DownlinkPathConstraint

Name Value Description
DOWNLINK_PATH_CONSTRAINT_NONE 0 Indicates that the gateway can be selected for downlink without constraints by the Network Server.
DOWNLINK_PATH_CONSTRAINT_PREFER_OTHER 1 Indicates that the gateway can be selected for downlink only if no other or better gateway can be selected.
DOWNLINK_PATH_CONSTRAINT_NEVER 2 Indicates that this gateway will never be selected for downlink, even if that results in no available downlink path.

Enum GatewayAntennaPlacement

Name Value Description
PLACEMENT_UNKNOWN 0
INDOOR 1
OUTDOOR 2

Enum LocationSource

Name Value Description
SOURCE_UNKNOWN 0 The source of the location is not known or not set.
SOURCE_GPS 1 The location is determined by GPS.
SOURCE_REGISTRY 3 The location is set in and updated from a registry.
SOURCE_IP_GEOLOCATION 4 The location is estimated with IP geolocation.
SOURCE_WIFI_RSSI_GEOLOCATION 5 The location is estimated with WiFi RSSI geolocation.
SOURCE_BT_RSSI_GEOLOCATION 6 The location is estimated with BT/BLE RSSI geolocation.
SOURCE_LORA_RSSI_GEOLOCATION 7 The location is estimated with LoRa RSSI geolocation.
SOURCE_LORA_TDOA_GEOLOCATION 8 The location is estimated with LoRa TDOA geolocation.
SOURCE_COMBINED_GEOLOCATION 9 The location is estimated by a combination of geolocation sources.

Enum Major

Name Value Description
LORAWAN_R1 0

Enum MType

Name Value Description
JOIN_REQUEST 0
JOIN_ACCEPT 1
UNCONFIRMED_UP 2
UNCONFIRMED_DOWN 3
CONFIRMED_UP 4
CONFIRMED_DOWN 5
REJOIN_REQUEST 6
PROPRIETARY 7

Enum Right

Right is the enum that defines all the different rights to do something in the network.

Name Value Description
right_invalid 0
RIGHT_USER_INFO 1 The right to view user information.
RIGHT_USER_SETTINGS_BASIC 2 The right to edit basic user settings.
RIGHT_USER_LIST 87 The right to list users accounts.
RIGHT_USER_CREATE 88 The right to create an user account.
RIGHT_USER_SETTINGS_API_KEYS 3 The right to view and edit user API keys.
RIGHT_USER_DELETE 4 The right to delete user account.
RIGHT_USER_PURGE 66 The right to purge user account.
RIGHT_USER_AUTHORIZED_CLIENTS 5 The right to view and edit authorized OAuth clients of the user.
RIGHT_USER_APPLICATIONS_LIST 6 The right to list applications the user is a collaborator of.
RIGHT_USER_APPLICATIONS_CREATE 7 The right to create an application under the user account.
RIGHT_USER_GATEWAYS_LIST 8 The right to list gateways the user is a collaborator of.
RIGHT_USER_GATEWAYS_CREATE 9 The right to create a gateway under the account of the user.
RIGHT_USER_CLIENTS_LIST 10 The right to list OAuth clients the user is a collaborator of.
RIGHT_USER_CLIENTS_CREATE 11 The right to create an OAuth client under the account of the user.
RIGHT_USER_ORGANIZATIONS_LIST 12 The right to list organizations the user is a member of.
RIGHT_USER_ORGANIZATIONS_CREATE 13 The right to create an organization under the user account.
RIGHT_USER_NOTIFICATIONS_READ 59 The right to read notifications sent to the user.
RIGHT_USER_ALL 14 The pseudo-right for all (current and future) user rights.
RIGHT_APPLICATION_INFO 15 The right to view application information.
RIGHT_APPLICATION_SETTINGS_BASIC 16 The right to edit basic application settings.
RIGHT_APPLICATION_SETTINGS_API_KEYS 17 The right to view and edit application API keys.
RIGHT_APPLICATION_SETTINGS_COLLABORATORS 18 The right to view and edit application collaborators.
RIGHT_APPLICATION_SETTINGS_PACKAGES 56 The right to view and edit application packages and associations.
RIGHT_APPLICATION_DELETE 19 The right to delete application.
RIGHT_APPLICATION_PURGE 64 The right to purge application.
RIGHT_APPLICATION_DEVICES_READ 20 The right to view devices in application.
RIGHT_APPLICATION_DEVICES_WRITE 21 The right to create devices in application.
RIGHT_APPLICATION_DEVICES_READ_KEYS 22 The right to view device keys in application. Note that keys may not be stored in a way that supports viewing them.
RIGHT_APPLICATION_DEVICES_WRITE_KEYS 23 The right to edit device keys in application.
RIGHT_APPLICATION_TRAFFIC_READ 24 The right to read application traffic (uplink and downlink).
RIGHT_APPLICATION_TRAFFIC_UP_WRITE 25 The right to write uplink application traffic.
RIGHT_APPLICATION_TRAFFIC_DOWN_WRITE 26 The right to write downlink application traffic.
RIGHT_APPLICATION_LINK 27 The right to link as Application to a Network Server for traffic exchange, i.e. read uplink and write downlink (API keys only). This right is typically only given to an Application Server. This right implies RIGHT_APPLICATION_INFO, RIGHT_APPLICATION_TRAFFIC_READ, and RIGHT_APPLICATION_TRAFFIC_DOWN_WRITE.
RIGHT_APPLICATION_ALL 28 The pseudo-right for all (current and future) application rights.
RIGHT_CLIENT_ALL 29 The pseudo-right for all (current and future) OAuth client rights.
RIGHT_CLIENT_INFO 60 The right to read client information.
RIGHT_CLIENT_SETTINGS_BASIC 61 The right to edit basic client settings.
RIGHT_CLIENT_SETTINGS_COLLABORATORS 62 The right to view and edit client collaborators.
RIGHT_CLIENT_DELETE 63 The right to delete a client.
RIGHT_CLIENT_PURGE 68 The right to purge a client.
RIGHT_GATEWAY_INFO 30 The right to view gateway information.
RIGHT_GATEWAY_SETTINGS_BASIC 31 The right to edit basic gateway settings.
RIGHT_GATEWAY_SETTINGS_API_KEYS 32 The right to view and edit gateway API keys.
RIGHT_GATEWAY_SETTINGS_COLLABORATORS 33 The right to view and edit gateway collaborators.
RIGHT_GATEWAY_DELETE 34 The right to delete gateway.
RIGHT_GATEWAY_PURGE 67 The right to purge gateway.
RIGHT_GATEWAY_TRAFFIC_READ 35 The right to read gateway traffic.
RIGHT_GATEWAY_TRAFFIC_DOWN_WRITE 36 The right to write downlink gateway traffic.
RIGHT_GATEWAY_LINK 37 The right to link as Gateway to a Gateway Server for traffic exchange, i.e. write uplink and read downlink (API keys only) This right is typically only given to a gateway. This right implies RIGHT_GATEWAY_INFO.
RIGHT_GATEWAY_STATUS_READ 38 The right to view gateway status.
RIGHT_GATEWAY_LOCATION_READ 39 The right to view view gateway location.
RIGHT_GATEWAY_WRITE_SECRETS 57 The right to store secrets associated with this gateway.
RIGHT_GATEWAY_READ_SECRETS 58 The right to retrieve secrets associated with this gateway.
RIGHT_GATEWAY_ALL 40 The pseudo-right for all (current and future) gateway rights.
RIGHT_ORGANIZATION_INFO 41 The right to view organization information.
RIGHT_ORGANIZATION_SETTINGS_BASIC 42 The right to edit basic organization settings.
RIGHT_ORGANIZATION_SETTINGS_API_KEYS 43 The right to view and edit organization API keys.
RIGHT_ORGANIZATION_SETTINGS_MEMBERS 44 The right to view and edit organization members.
RIGHT_ORGANIZATION_DELETE 45 The right to delete organization.
RIGHT_ORGANIZATION_PURGE 65 The right to purge organization.
RIGHT_ORGANIZATION_APPLICATIONS_LIST 46 The right to list the applications the organization is a collaborator of.
RIGHT_ORGANIZATION_APPLICATIONS_CREATE 47 The right to create an application under the organization.
RIGHT_ORGANIZATION_GATEWAYS_LIST 48 The right to list the gateways the organization is a collaborator of.
RIGHT_ORGANIZATION_GATEWAYS_CREATE 49 The right to create a gateway under the organization.
RIGHT_ORGANIZATION_CLIENTS_LIST 50 The right to list the OAuth clients the organization is a collaborator of.
RIGHT_ORGANIZATION_CLIENTS_CREATE 51 The right to create an OAuth client under the organization.
RIGHT_ORGANIZATION_ADD_AS_COLLABORATOR 52 The right to add the organization as a collaborator on an existing entity.
RIGHT_ORGANIZATION_ALL 53 The pseudo-right for all (current and future) organization rights.
RIGHT_SEND_INVITES 54 The right to send invites to new users. Note that this is not prefixed with “USER_”; it is not a right on the user entity.
RIGHT_ALERT_NOTIFICATION_PROFILE_CREATE 69 The right to create an alert notification profile.
RIGHT_ALERT_NOTIFICATION_PROFILE_INFO 70 The right to view an alert notification profile information.
RIGHT_ALERT_NOTIFICATION_PROFILE_LIST 71 The right to list the alert notification profiles.
RIGHT_ALERT_NOTIFICATION_PROFILE_UPDATE 72 The right to update an alert notification profiles.
RIGHT_ALERT_NOTIFICATION_PROFILE_DELETE 73 The right to delete an alert notification profiles.
RIGHT_ALERT_NOTIFICATION_RECEIVER_CREATE 74 The right to create an alert notification receiver.
RIGHT_ALERT_NOTIFICATION_RECEIVER_INFO 75 The right to view an alert notification receiver information.
RIGHT_ALERT_NOTIFICATION_RECEIVER_LIST 76 The right to list the alert notification receivers.
RIGHT_ALERT_NOTIFICATION_RECEIVER_UPDATE 77 The right to update an alert notification receivers.
RIGHT_ALERT_NOTIFICATION_RECEIVER_DELETE 78 The right to delete an alert notification receivers.
RIGHT_AUTHENTICATION_PROVIDER_CREATE 79 The right to create an authentication provider.
RIGHT_AUTHENTICATION_PROVIDER_INFO 80 The right to view an authentication provider information.
RIGHT_AUTHENTICATION_PROVIDER_LIST 81 The right to list the authentication providers
RIGHT_AUTHENTICATION_PROVIDER_UPDATE 82 The right to update an authentication providers.
RIGHT_AUTHENTICATION_PROVIDER_DELETE 83 The right to delete an authentication providers.
RIGHT_EXTERNAL_USER_CREATE 84 The right to create an external user.
RIGHT_EXTERNAL_USER_INFO 85 The right to view an external user’s information.
RIGHT_EXTERNAL_USER_DELETE 86 The right to delete an external user.
RIGHT_PACKET_BROKER_AGENT_READ 89 The right to read any information related to the PBA.
RIGHT_PACKET_BROKER_AGENT_WRITE 90 The right to perform operations in the PBA.
RIGHT_TENANT_CONFIGURATION_UPDATE 91 The right to update a tenant’s configuration.
RIGHT_LABEL_CREATE 92 The right to create a label.
RIGHT_LABEL_INFO 93 The right to view a label’s information.
RIGHT_LABELS_LIST 94 The right to list the labels.
RIGHT_LABEL_UPDATE 95 The right to update a label.
RIGHT_LABEL_DELETE 96 The right to delete a label.
RIGHT_LABEL_ASSIGN 97 The right to assign a label to an entity.
RIGHT_ALL 55 The pseudo-right for all (current and future) possible rights.

Enum RejoinRequestType

Name Value Description
CONTEXT 0 Resets DevAddr, Session Keys, Frame Counters, Radio Parameters.
SESSION 1 Equivalent to the initial JoinRequest.
KEYS 2 Resets DevAddr, Session Keys, Frame Counters, while keeping the Radio Parameters.

Enum RelayWORChannel

Name Value Description
RELAY_WOR_CHANNEL_DEFAULT 0
RELAY_WOR_CHANNEL_SECONDARY 1

Enum RxDelay

Name Value Description
RX_DELAY_0 0 1 second.
RX_DELAY_1 1 1 second.
RX_DELAY_2 2 2 seconds.
RX_DELAY_3 3 3 seconds.
RX_DELAY_4 4 4 seconds.
RX_DELAY_5 5 5 seconds.
RX_DELAY_6 6 6 seconds.
RX_DELAY_7 7 7 seconds.
RX_DELAY_8 8 8 seconds.
RX_DELAY_9 9 9 seconds.
RX_DELAY_10 10 10 seconds.
RX_DELAY_11 11 11 seconds.
RX_DELAY_12 12 12 seconds.
RX_DELAY_13 13 13 seconds.
RX_DELAY_14 14 14 seconds.
RX_DELAY_15 15 15 seconds.
← Organization APIs Storage Integration API →

On this page

  • The Pba service
  • The GsPba service
  • Messages
  • Enums

Sections

Getting Started

Concepts

The Things Stack Cloud

The Things Stack Enterprise

Integrations

API

Hardware

Sitemap

View our Sitemap

Contributing

GitHub

About Us

The Things Industries