Skip to content

REST Exporter Component

The REST Exporter component subscribes to a Bus and exports data matching a subscription pattern to a configurable REST endpoint.

REST Exporter Configuration Variables

The following table describes the REST exporter configuration variables:

Parameter Type Description Valid Values Required
Bus String The name of the Bus component to use The name of an existing Bus component Y
Logger String The name of the Logger component to use The name of an existing Logger component N
Pattern String The pattern to match on the Bus component for subscription Default: # Y
QueueSize Unsigned Integer The size of the queue for the subscriber to hold messages Default: 4 N
Endpoint String The REST endpoint to call A valid REST endpoint Y
ConnectTimeout Unsigned Integer The connection timeout in milliseconds Default is 1000 N
Timeout Unsigned Integer The data transfer timeout in milliseconds Default is 0 (no timeout during transfer) N
Headers Array of Strings Array of REST header files N
SSLConfig Object The MQTT SSL configuration to use See REST SSL Configuration Variables N

REST SSL Configuration Variables

The following table describes the REST SSL configuration variables:

Parameter Type Description Valid Values Required
CAPath String The file path for the CA certificate A valid path to the directory containing the CA certificate N
CAFile String The name of the CA file A valid CA file name N
SSLCert String The SSL certificate file A valid SSL certificate file name N
SSLKey String The SSL key file A valid SSL key file name N

REST Configuration Example

The following example configures a REST Exporter component:

{
  "Endpoint": "https://www.google.co.uk",
  "Pattern": "data/#",
  "Headers": ["Content-Type: application/json", "header-element1: header-data1"],
  "SSLConfig": {"CAPath": "/etc/ssl/certs"},
  "Bus": "Bus",
  "QueueSize": 2,
  "Logger": "logger"
}
Back to top