The Things Network / The Things Stack Ns API

The Ns API from The Things Network / The Things Stack — 4 operation(s) for ns.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

the-things-network-ns-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  title: The Things Stack — Application Server AppAs Ns API
  version: v3.36
  description: The Things Stack is an open-source LoRaWAN Network Server implementation. This OpenAPI was derived from the upstream gRPC-Gateway generated api.swagger.json published by TheThingsNetwork/lorawan-stack v3.36.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  contact:
    name: The Things Industries
    url: https://www.thethingsindustries.com
host: eu1.cloud.thethings.industries
basePath: /api/v3
schemes:
- https
consumes:
- application/json
produces:
- application/json
security:
- ApiKeyAuth: []
tags:
- name: Ns
paths:
  /ns/default_mac_settings/{frequency_plan_id}/{lorawan_phy_version}:
    get:
      summary: GetDefaultMACSettings retrieves the default MAC settings for a frequency plan.
      operationId: Ns_GetDefaultMACSettings
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v3MACSettings'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/googlerpcStatus'
      parameters:
      - name: frequency_plan_id
        in: path
        required: true
        type: string
      - name: lorawan_phy_version
        in: path
        required: true
        type: string
        enum:
        - PHY_UNKNOWN
        - PHY_V1_0
        - TS001_V1_0
        - PHY_V1_0_1
        - TS001_V1_0_1
        - PHY_V1_0_2_REV_A
        - RP001_V1_0_2
        - PHY_V1_0_2_REV_B
        - RP001_V1_0_2_REV_B
        - PHY_V1_1_REV_A
        - RP001_V1_1_REV_A
        - PHY_V1_1_REV_B
        - RP001_V1_1_REV_B
        - PHY_V1_0_3_REV_A
        - RP001_V1_0_3_REV_A
        - RP002_V1_0_0
        - RP002_V1_0_1
        - RP002_V1_0_2
        - RP002_V1_0_3
        - RP002_V1_0_4
      tags:
      - Ns
  /ns/dev_addr:
    get:
      summary: GenerateDevAddr requests a device address assignment from the Network Server.
      operationId: Ns_GenerateDevAddr
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v3GenerateDevAddrResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/googlerpcStatus'
      tags:
      - Ns
  /ns/dev_addr_prefixes:
    get:
      operationId: Ns_GetDeviceAddressPrefixes
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v3GetDeviceAdressPrefixesResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/googlerpcStatus'
      tags:
      - Ns
  /ns/net_id:
    get:
      operationId: Ns_GetNetID
      responses:
        '200':
          description: A successful response.
          schema:
            $ref: '#/definitions/v3GetNetIDResponse'
        default:
          description: An unexpected error response.
          schema:
            $ref: '#/definitions/googlerpcStatus'
      tags:
      - Ns
definitions:
  v3RelayLimitBucketSize:
    type: string
    enum:
    - RELAY_LIMIT_BUCKET_SIZE_1
    - RELAY_LIMIT_BUCKET_SIZE_2
    - RELAY_LIMIT_BUCKET_SIZE_4
    - RELAY_LIMIT_BUCKET_SIZE_12
    default: RELAY_LIMIT_BUCKET_SIZE_1
    title: '- RELAY_LIMIT_BUCKET_SIZE_12: sic'
  v3ADRAckLimitExponent:
    type: string
    enum:
    - ADR_ACK_LIMIT_1
    - ADR_ACK_LIMIT_2
    - ADR_ACK_LIMIT_4
    - ADR_ACK_LIMIT_8
    - ADR_ACK_LIMIT_16
    - ADR_ACK_LIMIT_32
    - ADR_ACK_LIMIT_64
    - ADR_ACK_LIMIT_128
    - ADR_ACK_LIMIT_256
    - ADR_ACK_LIMIT_512
    - ADR_ACK_LIMIT_1024
    - ADR_ACK_LIMIT_2048
    - ADR_ACK_LIMIT_4096
    - ADR_ACK_LIMIT_8192
    - ADR_ACK_LIMIT_16384
    - ADR_ACK_LIMIT_32768
    default: ADR_ACK_LIMIT_1
  v3ADRAckLimitExponentValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3ADRAckLimitExponent'
  ChannelSteeringSettingsLoRaNarrowMode:
    type: object
    description: 'Configuration options for LoRa narrow channels steering.

      The narrow mode attempts to steer the end device towards

      using the LoRa modulated, 125kHz bandwidth channels.'
  DynamicModeOverrides:
    type: object
    properties:
      data_rate_0:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_1:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_2:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_3:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_4:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_5:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_6:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_7:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_8:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_9:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_10:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_11:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_12:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_13:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_14:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
      data_rate_15:
        $ref: '#/definitions/DynamicModePerDataRateIndexOverride'
    description: 'EXPERIMENTAL: Configuration overrides.'
  v3RelayEndDeviceControlledMode:
    type: object
  v3RelayForwardLimits:
    type: object
    properties:
      bucket_size:
        $ref: '#/definitions/v3RelayLimitBucketSize'
        description: 'The multiplier used to compute the total bucket size for the limits.

          The multiplier is multiplied by the reload rate in order to compute the total bucket size.'
      reload_rate:
        type: integer
        format: int64
        description: The number of tokens which are replenished in the bucket every hour.
  DynamicModeChannelSteeringSettingsDisabledMode:
    type: object
    description: 'Configuration options for cases in which ADR is not supposed to steer the end device

      to another set of channels.'
  v3ADRSettingsDisabledMode:
    type: object
    description: 'Configuration options for cases in which ADR is to be disabled

      completely.'
  v3RxDelay:
    type: string
    enum:
    - RX_DELAY_0
    - RX_DELAY_1
    - RX_DELAY_2
    - RX_DELAY_3
    - RX_DELAY_4
    - RX_DELAY_5
    - RX_DELAY_6
    - RX_DELAY_7
    - RX_DELAY_8
    - RX_DELAY_9
    - RX_DELAY_10
    - RX_DELAY_11
    - RX_DELAY_12
    - RX_DELAY_13
    - RX_DELAY_14
    - RX_DELAY_15
    default: RX_DELAY_0
    description: " - RX_DELAY_0: 1 second.\n - RX_DELAY_1: 1 second.\n - RX_DELAY_2: 2 seconds.\n - RX_DELAY_3: 3 seconds.\n - RX_DELAY_4: 4 seconds.\n - RX_DELAY_5: 5 seconds.\n - RX_DELAY_6: 6 seconds.\n - RX_DELAY_7: 7 seconds.\n - RX_DELAY_8: 8 seconds.\n - RX_DELAY_9: 9 seconds.\n - RX_DELAY_10: 10 seconds.\n - RX_DELAY_11: 11 seconds.\n - RX_DELAY_12: 12 seconds.\n - RX_DELAY_13: 13 seconds.\n - RX_DELAY_14: 14 seconds.\n - RX_DELAY_15: 15 seconds."
  v3FrequencyValue:
    type: object
    properties:
      value:
        type: string
        format: uint64
  ADRSettingsDynamicMode:
    type: object
    properties:
      margin:
        type: number
        format: float
        description: 'The ADR margin (dB) tells the network server how much margin it should add in ADR requests.

          A bigger margin is less efficient, but gives a better chance of successful reception.

          If unset, the default value from Network Server configuration will be used.'
      min_data_rate_index:
        $ref: '#/definitions/v3DataRateIndexValue'
        description: 'Minimum data rate index.

          If unset, the default value from Network Server configuration will be used.'
      max_data_rate_index:
        $ref: '#/definitions/v3DataRateIndexValue'
        description: 'Maximum data rate index.

          If unset, the default value from Network Server configuration will be used.'
      min_tx_power_index:
        type: integer
        format: int64
        description: 'Minimum transmission power index.

          If unset, the default value from Network Server configuration will be used.'
      max_tx_power_index:
        type: integer
        format: int64
        description: 'Maximum transmission power index.

          If unset, the default value from Network Server configuration will be used.'
      min_nb_trans:
        type: integer
        format: int64
        description: 'Minimum number of retransmissions.

          If unset, the default value from Network Server configuration will be used.'
      max_nb_trans:
        type: integer
        format: int64
        description: 'Maximum number of retransmissions.

          If unset, the default value from Network Server configuration will be used.'
      channel_steering:
        $ref: '#/definitions/DynamicModeChannelSteeringSettings'
      overrides:
        $ref: '#/definitions/DynamicModeOverrides'
    description: Configuration options for dynamic ADR.
  v3DataRateIndex:
    type: string
    enum:
    - DATA_RATE_0
    - DATA_RATE_1
    - DATA_RATE_2
    - DATA_RATE_3
    - DATA_RATE_4
    - DATA_RATE_5
    - DATA_RATE_6
    - DATA_RATE_7
    - DATA_RATE_8
    - DATA_RATE_9
    - DATA_RATE_10
    - DATA_RATE_11
    - DATA_RATE_12
    - DATA_RATE_13
    - DATA_RATE_14
    - DATA_RATE_15
    default: DATA_RATE_0
  v3RelayUplinkForwardingRule:
    type: object
    properties:
      limits:
        $ref: '#/definitions/v3RelayUplinkForwardLimits'
        description: 'Bucket configuration for the served end device.

          If unset, no individual limits will apply to the end device, but the relay global limitations will apply.'
      last_w_f_cnt:
        type: integer
        format: int64
        description: Last wake on radio frame counter used by the served end device.
      device_id:
        type: string
        description: End device identifier of the served end device.
      session_key_id:
        type: string
        format: byte
        description: Session key ID of the session keys used to derive the root relay session key.
  v3ServingRelayForwardingLimits:
    type: object
    properties:
      reset_behavior:
        $ref: '#/definitions/v3RelayResetLimitCounter'
        description: Reset behavior of the buckets upon limit update.
      join_requests:
        $ref: '#/definitions/v3RelayForwardLimits'
        description: 'Bucket configuration for join requests.

          If unset, no individual limits will apply to join requests, but the relay overall limitations will apply.'
      notifications:
        $ref: '#/definitions/v3RelayForwardLimits'
        description: 'Bucket configuration for unknown device notifications.

          If unset, no individual limits will apply to unknown end device notifications, but the relay overall

          limitations will still apply.'
      uplink_messages:
        $ref: '#/definitions/v3RelayForwardLimits'
        description: 'Bucket configuration for uplink messages across all served end devices.

          If unset, no individual limits will apply to uplink messages across all served end devices, but the relay

          overall limitations will still apply.'
      overall:
        $ref: '#/definitions/v3RelayForwardLimits'
        description: 'Bucket configuration for all relay messages.

          If unset, no overall limits will apply to the relay, but individual limitations will still apply.'
  DynamicModePerDataRateIndexOverride:
    type: object
    properties:
      min_nb_trans:
        type: integer
        format: int64
        description: 'Minimum number of retransmissions.

          If unset, the default value from Network Server configuration will be used.'
      max_nb_trans:
        type: integer
        format: int64
        description: 'Maximum number of retransmissions.

          If unset, the default value from Network Server configuration will be used.'
    description: 'EXPERIMENTAL: Data rate index override settings.'
  v3GenerateDevAddrResponse:
    type: object
    properties:
      dev_addr:
        type: string
        format: string
        example: 2600ABCD
    description: Response of GenerateDevAddr.
  v3PingSlotPeriod:
    type: string
    enum:
    - PING_EVERY_1S
    - PING_EVERY_2S
    - PING_EVERY_4S
    - PING_EVERY_8S
    - PING_EVERY_16S
    - PING_EVERY_32S
    - PING_EVERY_64S
    - PING_EVERY_128S
    default: PING_EVERY_1S
    description: " - PING_EVERY_1S: Every second.\n - PING_EVERY_2S: Every 2 seconds.\n - PING_EVERY_4S: Every 4 seconds.\n - PING_EVERY_8S: Every 8 seconds.\n - PING_EVERY_16S: Every 16 seconds.\n - PING_EVERY_32S: Every 32 seconds.\n - PING_EVERY_64S: Every 64 seconds.\n - PING_EVERY_128S: Every 128 seconds."
  v3DeviceEIRP:
    type: string
    enum:
    - DEVICE_EIRP_8
    - DEVICE_EIRP_10
    - DEVICE_EIRP_12
    - DEVICE_EIRP_13
    - DEVICE_EIRP_14
    - DEVICE_EIRP_16
    - DEVICE_EIRP_18
    - DEVICE_EIRP_20
    - DEVICE_EIRP_21
    - DEVICE_EIRP_24
    - DEVICE_EIRP_26
    - DEVICE_EIRP_27
    - DEVICE_EIRP_29
    - DEVICE_EIRP_30
    - DEVICE_EIRP_33
    - DEVICE_EIRP_36
    default: DEVICE_EIRP_8
    description: " - DEVICE_EIRP_8: 8 dBm.\n - DEVICE_EIRP_10: 10 dBm.\n - DEVICE_EIRP_12: 12 dBm.\n - DEVICE_EIRP_13: 13 dBm.\n - DEVICE_EIRP_14: 14 dBm.\n - DEVICE_EIRP_16: 16 dBm.\n - DEVICE_EIRP_18: 18 dBm.\n - DEVICE_EIRP_20: 20 dBm.\n - DEVICE_EIRP_21: 21 dBm.\n - DEVICE_EIRP_24: 24 dBm.\n - DEVICE_EIRP_26: 26 dBm.\n - DEVICE_EIRP_27: 27 dBm.\n - DEVICE_EIRP_29: 29 dBm.\n - DEVICE_EIRP_30: 30 dBm.\n - DEVICE_EIRP_33: 33 dBm.\n - DEVICE_EIRP_36: 36 dBm."
  v3RelaySecondChannel:
    type: object
    properties:
      ack_offset:
        $ref: '#/definitions/v3RelaySecondChAckOffset'
        description: The frequency (Hz) offset used for the WOR acknowledgement.
      data_rate_index:
        $ref: '#/definitions/v3DataRateIndex'
        description: The data rate index used by the WOR and WOR acknowledgement.
      frequency:
        type: string
        format: uint64
        description: The frequency (Hz) used by the wake on radio message.
  v3RelayEndDeviceDynamicMode:
    type: object
    properties:
      smart_enable_level:
        $ref: '#/definitions/v3RelaySmartEnableLevel'
        description: 'The number of consecutive uplinks without a valid downlink before the end device attempts

          to use the relay mode to transmit messages.'
  v3ZeroableFrequencyValue:
    type: object
    properties:
      value:
        type: string
        format: uint64
  ADRSettingsStaticMode:
    type: object
    properties:
      data_rate_index:
        $ref: '#/definitions/v3DataRateIndex'
        description: Data rate index to use.
      tx_power_index:
        type: integer
        format: int64
        description: Transmission power index to use.
      nb_trans:
        type: integer
        format: int64
        description: Number of retransmissions.
    description: Configuration options for static ADR.
  v3ADRSettings:
    type: object
    properties:
      static:
        $ref: '#/definitions/ADRSettingsStaticMode'
      dynamic:
        $ref: '#/definitions/ADRSettingsDynamicMode'
      disabled:
        $ref: '#/definitions/v3ADRSettingsDisabledMode'
    description: Adaptive Data Rate settings.
  v3DataRateIndexValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3DataRateIndex'
  v3AggregatedDutyCycle:
    type: string
    enum:
    - DUTY_CYCLE_1
    - DUTY_CYCLE_2
    - DUTY_CYCLE_4
    - DUTY_CYCLE_8
    - DUTY_CYCLE_16
    - DUTY_CYCLE_32
    - DUTY_CYCLE_64
    - DUTY_CYCLE_128
    - DUTY_CYCLE_256
    - DUTY_CYCLE_512
    - DUTY_CYCLE_1024
    - DUTY_CYCLE_2048
    - DUTY_CYCLE_4096
    - DUTY_CYCLE_8192
    - DUTY_CYCLE_16384
    - DUTY_CYCLE_32768
    default: DUTY_CYCLE_1
    description: " - DUTY_CYCLE_1: 100%.\n - DUTY_CYCLE_2: 50%.\n - DUTY_CYCLE_4: 25%.\n - DUTY_CYCLE_8: 12.5%.\n - DUTY_CYCLE_16: 6.25%.\n - DUTY_CYCLE_32: 3.125%.\n - DUTY_CYCLE_64: 1.5625%.\n - DUTY_CYCLE_128: Roughly 0.781%.\n - DUTY_CYCLE_256: Roughly 0.390%.\n - DUTY_CYCLE_512: Roughly 0.195%.\n - DUTY_CYCLE_1024: Roughly 0.098%.\n - DUTY_CYCLE_2048: Roughly 0.049%.\n - DUTY_CYCLE_4096: Roughly 0.024%.\n - DUTY_CYCLE_8192: Roughly 0.012%.\n - DUTY_CYCLE_16384: Roughly 0.006%.\n - DUTY_CYCLE_32768: Roughly 0.003%."
  v3PingSlotPeriodValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3PingSlotPeriod'
  v3MACSettings:
    type: object
    properties:
      class_b_timeout:
        type: string
        description: 'Maximum delay for the device to answer a MAC request or a confirmed downlink frame.

          If unset, the default value from Network Server configuration will be used.'
      ping_slot_periodicity:
        $ref: '#/definitions/v3PingSlotPeriodValue'
        description: 'Periodicity of the class B ping slot.

          If unset, the default value from Network Server configuration will be used.'
      ping_slot_data_rate_index:
        $ref: '#/definitions/v3DataRateIndexValue'
        description: 'Data rate index of the class B ping slot.

          If unset, the default value from Network Server configuration will be used.'
      ping_slot_frequency:
        $ref: '#/definitions/v3ZeroableFrequencyValue'
        description: 'Frequency of the class B ping slot (Hz).

          If unset, the default value from Network Server configuration will be used.'
      beacon_frequency:
        $ref: '#/definitions/v3ZeroableFrequencyValue'
        description: 'Frequency of the class B beacon (Hz).

          If unset, the default value from Network Server configuration will be used.'
      class_c_timeout:
        type: string
        description: 'Maximum delay for the device to answer a MAC request or a confirmed downlink frame.

          If unset, the default value from Network Server configuration will be used.'
      rx1_delay:
        $ref: '#/definitions/v3RxDelayValue'
        description: 'Class A Rx1 delay.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      rx1_data_rate_offset:
        $ref: '#/definitions/v3DataRateOffsetValue'
        description: 'Rx1 data rate offset.

          If unset, the default value from Network Server configuration will be used.'
      rx2_data_rate_index:
        $ref: '#/definitions/v3DataRateIndexValue'
        description: 'Data rate index for Rx2.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      rx2_frequency:
        $ref: '#/definitions/v3FrequencyValue'
        description: 'Frequency for Rx2 (Hz).

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      factory_preset_frequencies:
        type: array
        items:
          type: string
          format: uint64
        description: 'List of factory-preset frequencies.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      max_duty_cycle:
        $ref: '#/definitions/v3AggregatedDutyCycleValue'
        description: Maximum uplink duty cycle (of all channels).
      supports_32_bit_f_cnt:
        $ref: '#/definitions/lorawanv3BoolValue'
        description: 'Whether the device supports 32-bit frame counters.

          If unset, the default value from Network Server configuration will be used.'
      use_adr:
        $ref: '#/definitions/lorawanv3BoolValue'
        description: 'Whether the Network Server should use ADR for the device.

          This field is deprecated, use adr_settings instead.'
      adr_margin:
        type: number
        format: float
        description: 'The ADR margin (dB) tells the network server how much margin it should add in ADR requests.

          A bigger margin is less efficient, but gives a better chance of successful reception.

          This field is deprecated, use adr_settings.dynamic.margin instead.'
      resets_f_cnt:
        $ref: '#/definitions/lorawanv3BoolValue'
        description: 'Whether the device resets the frame counters (not LoRaWAN compliant).

          If unset, the default value from Network Server configuration will be used.'
      status_time_periodicity:
        type: string
        description: 'The interval after which a DevStatusReq MACCommand shall be sent.

          If unset, the default value from Network Server configuration will be used.'
      status_count_periodicity:
        type: integer
        format: int64
        description: 'Number of uplink messages after which a DevStatusReq MACCommand shall be sent.

          If unset, the default value from Network Server configuration will be used.'
      desired_rx1_delay:
        $ref: '#/definitions/v3RxDelayValue'
        description: 'The Rx1 delay Network Server should configure device to use via MAC commands or Join-Accept.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      desired_rx1_data_rate_offset:
        $ref: '#/definitions/v3DataRateOffsetValue'
        description: 'The Rx1 data rate offset Network Server should configure device to use via MAC commands or Join-Accept.

          If unset, the default value from Network Server configuration will be used.'
      desired_rx2_data_rate_index:
        $ref: '#/definitions/v3DataRateIndexValue'
        description: 'The Rx2 data rate index Network Server should configure device to use via MAC commands or Join-Accept.

          If unset, the default value from frequency plan, Network Server configuration or regional parameters specification will be used.'
      desired_rx2_frequency:
        $ref: '#/definitions/v3FrequencyValue'
        description: 'The Rx2 frequency index Network Server should configure device to use via MAC commands.

          If unset, the default value from frequency plan, Network Server configuration or regional parameters specification will be used.'
      desired_max_duty_cycle:
        $ref: '#/definitions/v3AggregatedDutyCycleValue'
        description: 'The maximum uplink duty cycle (of all channels) Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration will be used.'
      desired_adr_ack_limit_exponent:
        $ref: '#/definitions/v3ADRAckLimitExponentValue'
        description: 'The ADR ACK limit Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      desired_adr_ack_delay_exponent:
        $ref: '#/definitions/v3ADRAckDelayExponentValue'
        description: 'The ADR ACK delay Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      desired_ping_slot_data_rate_index:
        $ref: '#/definitions/v3DataRateIndexValue'
        description: 'The data rate index of the class B ping slot Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration will be used.'
      desired_ping_slot_frequency:
        $ref: '#/definitions/v3ZeroableFrequencyValue'
        description: 'The frequency of the class B ping slot (Hz) Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      desired_beacon_frequency:
        $ref: '#/definitions/v3ZeroableFrequencyValue'
        description: 'The frequency of the class B beacon (Hz) Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration will be used.'
      desired_max_eirp:
        $ref: '#/definitions/v3DeviceEIRPValue'
        description: 'Maximum EIRP (dBm).

          If unset, the default value from regional parameters specification will be used.'
      class_b_c_downlink_interval:
        type: string
        description: The minimum duration passed before a network-initiated(e.g. Class B or C) downlink following an arbitrary downlink.
      uplink_dwell_time:
        $ref: '#/definitions/lorawanv3BoolValue'
        description: 'Whether uplink dwell time is set (400ms).

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      downlink_dwell_time:
        $ref: '#/definitions/lorawanv3BoolValue'
        description: 'Whether downlink dwell time is set (400ms).

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      adr:
        $ref: '#/definitions/v3ADRSettings'
        description: 'Adaptive Data Rate settings.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      schedule_downlinks:
        $ref: '#/definitions/lorawanv3BoolValue'
        description: 'Whether or not downlink messages should be scheduled.

          This option can be used in order to disable any downlink interaction with the end device. It will affect all types

          of downlink messages: data and MAC downlinks, and join accepts.'
      relay:
        $ref: '#/definitions/v3RelaySettings'
        description: 'The relay settings the end device is using.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
      desired_relay:
        $ref: '#/definitions/v3RelaySettings'
        description: 'The relay settings the Network Server should configure device to use via MAC commands.

          If unset, the default value from Network Server configuration or regional parameters specification will be used.'
  v3DeviceEIRPValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3DeviceEIRP'
  v3ADRAckDelayExponentValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3ADRAckDelayExponent'
  v3RelayUplinkForwardLimits:
    type: object
    properties:
      bucket_size:
        $ref: '#/definitions/v3RelayLimitBucketSize'
        description: 'The multiplier used to compute the total bucket size for the limits.

          The multiplier is multiplied by the reload rate in order to compute the total bucket size.'
      reload_rate:
        type: integer
        format: int64
        description: The number of tokens which are replenished in the bucket every hour.
  v3AggregatedDutyCycleValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3AggregatedDutyCycle'
  v3GetDeviceAdressPrefixesResponse:
    type: object
    properties:
      dev_addr_prefixes:
        type: array
        example:
        - 2600AB00/24
        items:
          type: string
          format: byte
  lorawanv3BoolValue:
    type: object
    properties:
      value:
        type: boolean
  v3RelayEndDeviceAlwaysMode:
    type: object
  v3DataRateOffsetValue:
    type: object
    properties:
      value:
        $ref: '#/definitions/v3DataRateOffset'
  v3RelayResetLimitCounter:
    type: string
    enum:
    - RELAY_RESET_LIMIT_COUNTER_ZERO
    - RELAY_RESET_LIMIT_COUNTER_RELOAD_RATE
    - RELAY_RESET_LIMIT_COUNTER_MAX_VALUE
    - RELAY_RESET_LIMIT_COUNTER_NO_RESET
    default: RELAY_RESET_LIMIT_COUNTER_ZERO
  v3ServingRelaySettings:
    type: object
    properties:
      second_channel:
        $ref: '#/definitions/v3RelaySecondChannel'
        description: Second wake on radio channel configuration.
      default_channel_index:
        type: integer
        format: int64
        description: 'Index of the default wake on radio channel.

          If unset, the default value from Network Server configuration will be used.'
      cad_periodicity:
        $ref: '#/definitions/v3RelayCADPeriodicity'
        description: Channel activity detection periodicity.
      uplink_forwarding_rules:
        type: array
        items:
          type: object
          $ref: '#/definitions/v3RelayUplinkForwardingRule'
        description: Configured uplink forwarding rules.
      limits:
        $ref: '#/definitions/v3ServingRelayForwardingLimits'
        description: 'Configured forwarding limits.

          If unset, the default value from Network Server configuration will be used.'
  googlerpcStatus:
    type: object
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string
      details:
        type: array
        items:
          type: object
          $ref: '#/definitions/protobufAny'
  v3ADRAckDelayExponent:
    type: string
    enum:
    - ADR_ACK_DELAY_1
    - ADR_ACK_DELAY_2
    - ADR_ACK_DELAY_4
    - ADR_ACK_DELAY_8
    - ADR_ACK_DELAY_16
    - ADR_ACK_DELAY_32
    - ADR_ACK_DELAY_64
    - ADR_ACK_DELAY_128
    - ADR_ACK_DELAY_256
    - ADR_ACK_DELAY_512
    - ADR_ACK_DELAY_1024
    - ADR_ACK_DELAY_2048
    - ADR_ACK_DELAY_4096
    - ADR_ACK_DELAY_8192
    - ADR_ACK_DELAY_16384
    - ADR_ACK_DELAY_32768
    default: ADR_ACK_DELAY_1
  v3GetNetIDResponse:
    type: object
    properties:
      net_id:
        type: string
        format: string
        example: '000013'
  v3RelaySecondChAckOffset:
    type: string
    enum:
    - RELAY_SECOND_CH_ACK_OFFSET_0
    - RELAY_SECOND_CH_ACK_OFFSET_200
    - RELAY_SECOND_CH_ACK_OFFSET_400
    - RELAY_SECOND_CH_ACK_OFFSET_800
    - RELAY_SECOND_CH_ACK_OFFSET_1600
    - RELAY_SECOND_CH_ACK_OFFSET_3200
    default: RELAY_SECOND_CH_ACK_OFFSET_0
    title: "- RELAY_SECOND_CH_ACK_OFFSET_0: 0 kHz\n - RELAY_SECOND_CH_ACK_OFFSET_200: 200 kHz\n - RELAY_SECOND_CH_ACK_OFFSET_400: 400 kHz\n - RELAY_SECOND_CH_ACK_OFFSET_800: 800 kHz\n - RELAY_SECOND_CH_ACK_OFFSET_1600: 1.6 MHz\n - RELAY_SECOND_CH_ACK_OFFSET_3200: 3.2 MHz"
  v3RelaySmartEnableLevel:
    type: string
    enum:
    - RELAY_SMART_ENABLE_LEVEL_8
    - RELAY_SMART_ENABLE_LEVEL_16
    - RELAY_SMART_ENABLE_LEVEL_32
    - RELAY_SMART_ENABLE_LEVEL_64
    default: RELAY_SMART_ENABLE_LEVEL_8
  v3DataRateOffset:
    type: string
    enum:
    - DATA_RATE_OFFSET_0
    - DATA_RATE_OFFSET_1
    - DATA_RATE_OFFSET_2
    - DATA_RATE_OFFSET_3
    - DATA_RATE_OFFSET_4
    - DATA_RATE_OFFSET_5
    - DATA_RATE_OFFSET_6
    - DATA_RATE_OFFSET_7
    default: DATA_RATE_OFFSET_0
  v3RelaySettings:
    type: object
    properties:
      serving:
        $ref: '#/definitions/v3ServingRelaySettings'
      served:
        $ref: '#/definitions/v3ServedRelaySettings'
    description: 'RelaySettings represent the settings of a relay.

      This is used internally by the Network Server.'
  v3ServedRelaySettings:
    type: object
    properties:
      always:
        $ref: '#/definitions/v3RelayEndDeviceAlwaysMode'
        description: The end device will always attempt to use the relay mode in order to send uplink messages.
      dynamic:
        $ref: '#/definitions/v3RelayEndDeviceDynamicMode'
        description: 'The end device will attempt to use relay mode only after a number of uplink messages have been sent without

          receiving a valid a downlink message.'
      end_device_controlled:
        $ref: '#/definitions/v3RelayEndDeviceControlledMode'
        description: The end device will control when it uses the relay mode. This is the default mode.
      backoff:
        type: integer
        format: int64
        description: 'Number of wake on radio frames to be sent without an acknowledgement before sending the uplink message directly.

          If unset, the default value from Network Server configuration will be used.'
      second_channel:
        $ref: '#/definitions/v3RelaySecondChannel'
        description: Second wake on radio channel configuration.
      serving_device_id:
        type: string
        description: End device identifier of the serving end device.
  DynamicModeChannelSteeringSettings:
    type: object
    properties:
      lora_narrow:
        $ref: '#/definitions/ChannelSteeringSettings

# --- truncated at 32 KB (36 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/the-things-network/refs/heads/main/openapi/the-things-network-ns-api-openapi.yml