v3.19.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 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
  • 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

Application Pub/Sub APIs

The ApplicationPubSubRegistry service

Method ApplicationPubSubRegistry.GetFormats
Request type google.protobuf.Empty
Response type ApplicationPubSubFormats
HTTP bindings

GET /api/v3/as/pubsub-formats

Method ApplicationPubSubRegistry.Set
Request type SetApplicationPubSubRequest
Response type ApplicationPubSub
HTTP bindings

PUT /api/v3/as/pubsub/{pubsub.ids.application_ids.application_id}/{pubsub.ids.pub_sub_id}

POST /api/v3/as/pubsub/{pubsub.ids.application_ids.application_id}

Method ApplicationPubSubRegistry.Get
Request type GetApplicationPubSubRequest
Response type ApplicationPubSub
HTTP bindings

GET /api/v3/as/pubsub/{ids.application_ids.application_id}/{ids.pub_sub_id}

Method ApplicationPubSubRegistry.List
Request type ListApplicationPubSubsRequest
Response type ApplicationPubSubs
HTTP bindings

GET /api/v3/as/pubsub/{application_ids.application_id}

Method ApplicationPubSubRegistry.Delete
Request type ApplicationPubSubIdentifiers
Response type google.protobuf.Empty
HTTP bindings

DELETE /api/v3/as/pubsub/{application_ids.application_id}/{pub_sub_id}

Messages

Message ApplicationPubSub

Restrictions:
  • Only one of nats, mqtt, aws_iot can be set.
Show object example
{
  "ids": {},
  "created_at": "0001-01-01T00:00:00Z",
  "updated_at": "0001-01-01T00:00:00Z",
  "format": "",
  "nats": {},
  "mqtt": {},
  "aws_iot": {},
  "base_topic": "",
  "downlink_push": {},
  "downlink_replace": {},
  "uplink_message": {},
  "join_accept": {},
  "downlink_ack": {},
  "downlink_nack": {},
  "downlink_sent": {},
  "downlink_failed": {},
  "downlink_queued": {},
  "downlink_queue_invalidated": {},
  "location_solved": {},
  "service_data": {},
}

Fields:

Field ids
Type ApplicationPubSubIdentifiers
Description

required

Field created_at
Type google.protobuf. Timestamp
Field updated_at
Type google.protobuf. Timestamp
Field format
Type string
Description

The format to use for the body. Supported values depend on the Application Server configuration.

max_len: 20

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

Field nats
Type ApplicationPubSub.NATSProvider
Field mqtt
Type ApplicationPubSub.MQTTProvider
Field aws_iot
Type ApplicationPubSub.AWSIoTProvider
Field base_topic
Type string
Description

Base topic name to which the messages topic is appended.

max_len: 100

Field downlink_push
Type ApplicationPubSub.Message
Description

The topic to which the Application Server subscribes for downlink queue push operations.

Field downlink_replace
Type ApplicationPubSub.Message
Description

The topic to which the Application Server subscribes for downlink queue replace operations.

Field uplink_message
Type ApplicationPubSub.Message
Field join_accept
Type ApplicationPubSub.Message
Field downlink_ack
Type ApplicationPubSub.Message
Field downlink_nack
Type ApplicationPubSub.Message
Field downlink_sent
Type ApplicationPubSub.Message
Field downlink_failed
Type ApplicationPubSub.Message
Field downlink_queued
Type ApplicationPubSub.Message
Field downlink_queue_invalidated
Type ApplicationPubSub.Message
Field location_solved
Type ApplicationPubSub.Message
Field service_data
Type ApplicationPubSub.Message

Message ApplicationPubSub.Message

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

Fields:

Field topic
Type string
Description

The topic on which the Application Server publishes or receives the messages.

max_len: 100

Message ApplicationPubSub.MQTTProvider

The MQTT provider settings.

Show object example
{
  "server_url": "",
  "client_id": "",
  "username": "",
  "password": "",
  "subscribe_qos": "AT_MOST_ONCE",
  "publish_qos": "AT_MOST_ONCE",
  "use_tls": false,
  "tls_ca": "",
  "tls_client_cert": "",
  "tls_client_key": "",
  "headers": {},
}

Fields:

Field server_url
Type string
Description

uri

Field client_id
Type string
Description

max_len: 23

Field username
Type string
Description

max_len: 100

Field password
Type string
Description

max_len: 100

Field subscribe_qos
Type ApplicationPubSub.MQTTProvider.QoS
Field publish_qos
Type ApplicationPubSub.MQTTProvider.QoS
Field use_tls
Type bool
Field tls_ca
Type bytes
Description

The server Root CA certificate. PEM formatted.

max_len: 8192

Field tls_client_cert
Type bytes
Description

The client certificate. PEM formatted.

max_len: 8192

Field tls_client_key
Type bytes
Description

The client private key. PEM formatted.

max_len: 8192

Field headers
Type map of string to string
Description

HTTP headers to use on MQTT-over-Websocket connections.

Message ApplicationPubSub.NATSProvider

The NATS provider settings.

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

Fields:

Field server_url
Type string
Description

The server connection URL.

uri

Message ApplicationPubSubFormats

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

Fields:

Field formats
Type map of string to string
Description

Format and description.

Message ApplicationPubSubIdentifiers

Show object example
{
  "application_ids": {},
  "pub_sub_id": "",
}

Fields:

Field application_ids
Type ApplicationIdentifiers
Description

required

Field pub_sub_id
Type string
Description

max_len: 36

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

Message ApplicationPubSubs

Show object example
{
  "pubsubs": [],
}

Fields:

Field pubsubs
Type repeated ApplicationPubSub
Description

Message GetApplicationPubSubRequest

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

Fields:

Field ids
Type ApplicationPubSubIdentifiers
Description

required

Field field_mask
Type google.protobuf. FieldMask

Message ListApplicationPubSubsRequest

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

Fields:

Field application_ids
Type ApplicationIdentifiers
Description

required

Field field_mask
Type google.protobuf. FieldMask

Message SetApplicationPubSubRequest

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

Fields:

Field pubsub
Type ApplicationPubSub
Description

required

Field field_mask
Type google.protobuf. FieldMask

Message ApplicationIdentifiers

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

Fields:

Field application_id
Type string
Description

max_len: 36

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

Message ApplicationPubSub.AWSIoTProvider

Restrictions:
  • Only one of default can be set.
Show object example
{
  "region": "",
  "access_key": {},
  "assume_role": {},
  "endpoint_address": "",
  "default": {},
}

Fields:

Field region
Type string
Description

The AWS region.

in: [af-south-1 ap-east-1 ap-northeast-1 ap-northeast-2 ap-south-1 ap-southeast-1 ap-southeast-2 ca-central-1 eu-central-1 eu-north-1 eu-south-1 eu-west-1 eu-west-2 eu-west-3 me-south-1 sa-east-1 us-east-1 us-east-2 us-west-1 us-west-2]

Field access_key
Type ApplicationPubSub.AWSIoTProvider.AccessKey
Description

If set, the integration will use an AWS access key.

Field assume_role
Type ApplicationPubSub.AWSIoTProvider.AssumeRole
Description

If set, the integration will assume the given role during operation.

Field endpoint_address
Type string
Description

The endpoint address to connect to. If the endpoint address is left empty, the integration will try to discover it.

max_len: 128

pattern: ^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])|)$

Field default
Type ApplicationPubSub.AWSIoTProvider.DefaultIntegration
Description

Enable the default integration. This overrides custom base topic and message topics of the pub/sub integration.

Message ApplicationPubSub.AWSIoTProvider.AccessKey

Show object example
{
  "access_key_id": "",
  "secret_access_key": "",
  "session_token": "",
}

Fields:

Field access_key_id
Type string
Description

max_len: 128

min_len: 16

pattern: ^[\w]*$

Field secret_access_key
Type string
Description

max_len: 40

Field session_token
Type string
Description

max_len: 256

Message ApplicationPubSub.AWSIoTProvider.AssumeRole

Show object example
{
  "arn": "",
  "external_id": "",
  "session_duration": "0s",
}

Fields:

Field arn
Type string
Description

pattern: ^arn:aws:iam::[0-9]{12}:role\/[A-Za-z0-9_+=,.@-]+$

Field external_id
Type string
Description

max_len: 1224

pattern: ^[\w+=,.@:\/-]*$

Field session_duration
Type google.protobuf. Duration

Message ApplicationPubSub.AWSIoTProvider.DefaultIntegration

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

Fields:

Field stack_name
Type string
Description

The stack name that is associated with the CloudFormation deployment of The Things Stack Enterprise integration.

max_len: 128

pattern: ^[A-Za-z][A-Za-z0-9\-]*$

Enums

Enum ApplicationPubSub.MQTTProvider.QoS

Name Value Description
AT_MOST_ONCE 0
AT_LEAST_ONCE 1
EXACTLY_ONCE 2
← Application Package APIs Application Server APIs →

On this page

  • The ApplicationPubSubRegistry 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 Ben Olayinka on 12 Jul 2021.
Add missing API messages and enums (fix broken links) (#442)

Edit on Github