v3.23.1

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Reference

    Overview
  • Adaptive Data Rate
  • API
    • Authentication
    • Fields and Field Masks
    • Application APIs
    • Application Package APIs
    • Application Pub/Sub APIs
    • Application Server APIs
    • Application Webhook APIs
    • Client APIs
    • End Device APIs
    • Events API
    • Gateway APIs
    • Gateway Server APIs
    • Gateway Server MQTT
    • Network Operations Center APIs
    • Network Server APIs
    • Organization APIs
    • Storage Integration API
    • Tenant APIs
    • User APIs
  • Application Packages
  • Billing with Stripe
  • Command-Line Interface
  • Components
  • Configuration
  • Data Formats
  • Data Retention and Privacy
  • Email Templates
  • Federated Authentication
  • Frequency Plans
  • FUOTA
  • Gateway RTT
  • Glossary
  • ID and EUI Constraints
  • Last Activity
  • LoRa Basics Station Implementation Guide
  • LoRaWAN Backend Interfaces Interoperability
  • LoRaWAN Specification and Regional Parameters
  • Networking
  • Packet Broker Routing
  • Packet Forwarders
  • Purging Entities
  • Rate Limiting
  • Resource Limiting
  • Root Certificates
  • Telemetry
  • Tenant Management
  • Web UI Branding

Gateway Server APIs

The Gs service

Method Gs.GetGatewayConnectionStats
Description Get statistics about the current gateway connection to the Gateway Server. This is not persisted between reconnects.
Request type GatewayIdentifiers
Response type GatewayConnectionStats
HTTP bindings

GET /api/v3/gs/gateways/{gateway_id}/connection/stats

Method Gs.BatchGetGatewayConnectionStats
Description Get statistics about gateway connections to the Gateway Server of a batch of gateways. This is not persisted between reconnects. Gateways that are not connected or are part of a different cluster are ignored. It is up to the client to make sure that the gateways are in the requested cluster.
Request type BatchGetGatewayConnectionStatsRequest
Response type BatchGetGatewayConnectionStatsResponse
HTTP bindings

POST /api/v3/gs/gateways/connection/stats

The GatewayConfigurator service

Method GatewayConfigurator.PullConfiguration
Request type PullGatewayConfigurationRequest
Response type Stream of Gateway
HTTP bindings

The GatewayConfigurationService service

Method GatewayConfigurationService.GetGatewayConfiguration
Request type GetGatewayConfigurationRequest
Response type GetGatewayConfigurationResponse
HTTP bindings

/api/v3

GET /api/v3/gcs/gateways/configuration/{gateway_ids.gateway_id}/{format}/{filename}

GET /api/v3/gcs/gateways/configuration/{gateway_ids.gateway_id}/{format}/{type}/{filename}

Messages

Message BatchGetGatewayConnectionStatsRequest

Show object example
{
  "gateway_ids": [],
  "field_mask": {},
}

Fields:

Field gateway_ids
Type repeated GatewayIdentifiers
Description

max_items: 100

min_items: 1

Field field_mask
Type google.protobuf. FieldMask
Description

The names of the gateway stats fields that should be returned. This mask will be applied on each entry returned.

Message BatchGetGatewayConnectionStatsResponse

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

Fields:

Field entries
Type map of string to GatewayConnectionStats
Description

The map key is the gateway identifier.

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 GetGatewayConfigurationRequest

Show object example
{
  "gateway_ids": {},
  "format": "",
  "type": "",
  "filename": "",
}

Fields:

Field gateway_ids
Type GatewayIdentifiers
Description

required

Field format
Type string
Description

max_len: 36

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

Field type
Type string
Description

max_len: 36

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

Field filename
Type string
Description

max_len: 36

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

Message GetGatewayConfigurationResponse

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

Fields:

Field contents
Type bytes

Message GatewayConnectionStats

Connection stats as monitored by the Gateway Server.

Show object example
{
  "connected_at": "0001-01-01T00:00:00Z",
  "disconnected_at": "0001-01-01T00:00:00Z",
  "protocol": "",
  "last_status_received_at": "0001-01-01T00:00:00Z",
  "last_status": {},
  "last_uplink_received_at": "0001-01-01T00:00:00Z",
  "uplink_count": 0,
  "last_downlink_received_at": "0001-01-01T00:00:00Z",
  "downlink_count": 0,
  "round_trip_times": {},
  "sub_bands": [],
  "gateway_remote_address": {},
}

Fields:

Field connected_at
Type google.protobuf. Timestamp
Field disconnected_at
Type google.protobuf. Timestamp
Field protocol
Type string
Description

Protocol used to connect (for example, udp, mqtt, grpc)

Field last_status_received_at
Type google.protobuf. Timestamp
Field last_status
Type GatewayStatus
Field last_uplink_received_at
Type google.protobuf. Timestamp
Field uplink_count
Type uint64
Field last_downlink_received_at
Type google.protobuf. Timestamp
Field downlink_count
Type uint64
Field round_trip_times
Type GatewayConnectionStats.RoundTripTimes
Field sub_bands
Type repeated GatewayConnectionStats.SubBand
Description

Statistics for each sub band.

Field gateway_remote_address
Type GatewayRemoteAddress
Description

Gateway Remote Address.

Message GatewayConnectionStats.RoundTripTimes

Show object example
{
  "min": "0s",
  "max": "0s",
  "median": "0s",
  "count": 0,
}

Fields:

Field min
Type google.protobuf. Duration
Field max
Type google.protobuf. Duration
Field median
Type google.protobuf. Duration
Field count
Type uint32

Message GatewayConnectionStats.SubBand

Show object example
{
  "min_frequency": 0,
  "max_frequency": 0,
  "downlink_utilization_limit": 0,
  "downlink_utilization": 0,
}

Fields:

Field min_frequency
Type uint64
Field max_frequency
Type uint64
Field downlink_utilization_limit
Type float
Description

Duty-cycle limit of the sub-band as a fraction of time.

Field downlink_utilization
Type float
Description

Utilization rate of the available duty-cycle. This value should not exceed downlink_utilization_limit.

Message GatewayStatus

Show object example
{
  "time": "0001-01-01T00:00:00Z",
  "boot_time": "0001-01-01T00:00:00Z",
  "versions": {},
  "antenna_locations": [],
  "ip": [],
  "metrics": {},
  "advanced": {},
}

Fields:

Field time
Type google.protobuf. Timestamp
Description

Current time of the gateway

Field boot_time
Type google.protobuf. Timestamp
Description

Boot time of the gateway

  • can be left out to save bandwidth; old value will be kept

Field versions
Type map of string to string
Description

Versions of gateway subsystems

  • each field can be left out to save bandwidth; old value will be kept
  • map keys are written in snake_case
  • for example: firmware: “2.0.4” forwarder: “v2-3.3.1” fpga: “48” dsp: “27” hal: “v2-3.5.0”

max_pairs: 10

max_len (key): 36

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

max_len (value): 128

Field antenna_locations
Type repeated Location
Description

Location of each gateway’s antenna

  • if left out, server uses registry-set location as fallback

max_items: 8

Field ip
Type repeated string
Description

IP addresses of this gateway. Repeated addresses can be used to communicate addresses of multiple interfaces (LAN, Public IP, …).

max_items: 10

ip

Field metrics
Type map of string to float
Description

Metrics

  • can be used for forwarding gateway metrics such as temperatures or performance metrics
  • map keys are written in snake_case

max_pairs: 32

max_len (key): 36

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

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 GatewayRemoteAddress

Remote Address of the Gateway, as seen by the Gateway Server.

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

Fields:

Field ip
Type string
Description

IPv4 or IPv6 address.

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 PullGatewayConfigurationRequest

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

Fields:

Field gateway_ids
Type GatewayIdentifiers
Field field_mask
Type google.protobuf. FieldMask

Enums

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.
← Gateway APIs Gateway Server MQTT →

On this page

  • The Gs service
  • The GatewayConfigurator service
  • The GatewayConfigurationService service
  • Messages
  • Enums

The Things Stack

Getting Started

Devices

Gateways

Integrations

Reference

Contributing

GitHub

Forum

About Us

The Things Network

The Things Industries

About this page

Last changed by Nejra Selimović on 20 Jul 2022.
doc: Add v3.20.2 release docs (#924)

Edit on Github