LogoLogo
Website
  • Overview
  • Getting started
  • Integrations
    • MQTT Integration
    • HTTPS Integration
    • LORIOT Integration
    • Swisscom LPN Integration
    • TheThingsNetwork Integration
    • TheThingsIndustries Integration
    • Sigfox Integration
    • AWS IoT Integration
    • AWS Kinesis Integration
    • Azure Event Hub Integration
    • Azure IoT Hub Integration
    • Helium Network Integration
  • Key concept
    • Entities and relations
    • Entity Groups
    • Attributes
    • Device Profiles
    • Telemetry data
    • Device alarms
    • Version control
  • Dashboards
    • Dashboards
      • Dashboard Templates
      • IAQ Template
      • Aliases
    • Widget library
      • Energy management widgets
        • Summarized annual consumption
        • Daily profile
        • XY chart
  • Rule Engine
    • Rule Engine
      • Rule Engine Templates
        • General data proccessing concept
        • Weather data feed
      • Test Javascript function
      • Predefined Message Types
      • Filter rule nodes
        • check alarm status
        • check existence fields
        • check relation
        • gps geofencing filter
        • message type filter
        • message type switch
        • originator type filter
        • originator type switch
        • script filter
        • switch script node
      • Enrichment rule nodes
        • calculate delta
        • customer attributes
        • customer details
        • originator attributes
        • originator fields
        • originator telemetry
        • related attributes
        • related Device attributes
        • tenant attributes
        • tenant details
      • Transformation rule nodes
        • change originator
        • duplicate to group
        • duplicate to related
        • script transformation
        • to email transformation
        • M-Bus decoder
      • Action rule nodes
        • Add to group
        • Remove from group
        • Generate report
        • Integration Downlink
        • REST Call Reply
        • Change owner
        • Create alarm
        • Clear alarm
        • Delay messages
        • Generator
        • Log
        • RPC Call Reply
        • RPC Call Request
        • GPS geofencing events
        • Save attributes
        • Math Function
        • Asset Profiles Feature
        • fetch device credentials
        • delete attributes
        • split array msg
        • json path
        • delete keys
        • rename keys
        • copy keys
        • Save to Custom
        • Assign To Customer
        • Unassign From Customer
        • Create Relation
        • Delete Relation
        • Push to cloud
        • Pus to edge
        • Save timeseries
      • Analytics rule nodes
        • Aggregate Latest
        • Aggregate Stream
        • Alarms Count
      • Output connectors
        • AWS SNS
        • AWS SQS
        • MQTT
        • RabbitMQ
        • Kafka
        • Azure IoT Hub
        • Rest API
        • Priva
          • Realtime Telemetry API
          • Realtime Setpoint API
          • Data Insight Metadata API
          • Data Insight History API
          • Alarm Data Api
        • SOAP API
        • send email
        • send SMS
        • send Twilio SMS
      • Flow
        • Acknowledge
        • Checkpoint
        • Rule Chain
        • Output
  • Device Type Library
    • telemetry data keys
    • attribute data keys
      • Assets
        • Property
          • Building
          • Floor
          • Room
        • Facility
          • Component
        • City Zone
      • Devices
    • relation Type keys
  • API documentation
    • Admin Controller
  • CLI Tool
    • How to install the tool
    • Dataimport
  • Dynamic QR Codes
    • Dynamic QR Code App
Powered by GitBook
On this page
  • Configuration:
  • Endpoint URL
  • Headers
  • Sample how to send a Rest API call to Loriot Network server

Was this helpful?

  1. Rule Engine
  2. Rule Engine
  3. Output connectors

Rest API

PreviousAzure IoT HubNextPriva

Last updated 2 years ago

Was this helpful?

Invoke REST API calls to the external REST server.

Configuration:

  • Endpoint URL pattern - Can be a static string, or pattern that is resolved using Message Metadata properties. For example ${deviceType}

  • Request method - GET, POST, PUT, DELETE

  • Headers - request headers, header or value can be a static string, or pattern that is resolved using Message Metadata properties.

Endpoint URL

URL can be a static string or a pattern. Only Message metadata is used for resolving patterns. So property names that are used in the patterns must exist in the Message Metadata, otherwise raw pattern will be added into URL.

For example, if Message payload contains property deviceType with value container, then this pattern:

http://localhost/api/${deviceType}/update

will be resolved to

http://localhost/api/container/update

Headers

Collection of header name/value can be configured. Those headers will be added into Rest request. Pattern should be used for configured both header name and header value. For example ${deviceType}. Only Message metadata is used for resolving patterns. So property names that are used in the pattern must exist in the Message Metadata, otherwise raw pattern will be added into header.

Request body - Node will send full Message payload to the configured REST endpoint. If required, Rule Chain can be configured to use chain of Transformation Nodes for sending correct Payload.

Outbound message from this node will contain response status, statusCode, statusReason and responce headers in the Message metadata. Outbound Message payload will be the same as response body. Original Message type and originator will not be changed.

To send a single file as request body, add a field attachments to the message metadata with file uuid stored in DataBase. In that case any message data will be ignored and only file content will be sent. To define a request content type use the header setting like

Content-Type: application/json; charset=UTF-8

Here an example of message metadata to send a single file:

{
  "attachments": "e18b6950-dfca-11eb-affb-8db134b46d68"
}

In case of successful request, outbound message will be passed to the next nodes via Success chain, otherwise Failure chain is used.

Sample how to send a Rest API call to Loriot Network server

POST api call for device registration

Page cover image