thethingsstack.io has moved to thethingsindustries.com/docs
Got it

v3.12

Getting Started Devices Gateways Integrations Reference
Get The Things Stack

Reference

    Overview
  • Billing with Stripe
  • API
    • Authentication
    • Fields and Field Masks
    • Application APIs
    • Application Pub/Sub APIs
    • Application Server APIs
    • Application Webhook APIs
    • End Device APIs
    • End Device Claiming APIs
    • Events API
    • Gateway APIs
    • Gateway Server APIs
    • Gateway Server MQTT
    • Network Server APIs
    • Organization APIs
    • Storage Integration API
    • Tenant APIs
    • User APIs
  • Application Packages
  • Command-Line Interface
  • Components
  • Configuration
  • Data Formats
  • Email Templates
  • Federated Authentication
  • Frequency Plans
  • Glossary
  • ID and EUI Constraints
  • Interoperability Repository
  • LoRaWAN Specification and Regional Parameters
  • Networking
  • Packet Broker
  • Rate Limiting
  • Root Certificates
  • Telemetry
  • 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

Messages

Message GatewayIdentifiers

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.

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

Message GatewayConnectionStats

Connection stats as monitored by the Gateway Server.

Field connected_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.

Show object example
{
  "connected_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": [],
}

Message GatewayConnectionStats.RoundTripTimes

Field min
Type google.protobuf.Duration
Field max
Type google.protobuf.Duration
Field median
Type google.protobuf.Duration
Field count
Type uint32
Show object example
{
  "min": "0s",
  "max": "0s",
  "median": "0s",
  "count": 0,
}

Message GatewayStatus

Field time
Type google.protobuf.Timestamp
Description

Current time of the gateway

required

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): 32

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: 10

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

Show object example
{
  "time": "0001-01-01T00:00:00Z",
  "boot_time": "0001-01-01T00:00:00Z",
  "versions": {},
  "antenna_locations": [],
  "ip": [],
  "metrics": {},
  "advanced": {},
}
← Gateway APIs Gateway Server MQTT →

On this page

  • The Gs service
  • Messages

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 Johan Stokking on 02 Apr 2020.
doc: Remove weights

Edit on Github