Priva
Last updated
Last updated
Invoke REST API calls to the external REST server.
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.
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
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:
In case of successful request, outbound message will be passed to the next nodes via Success chain, otherwise Failure chain is used.
The Realtime Telemetry API. This is a collection of API's which you can use to create/update/delete an eventhub and to subscribe/resubscribe/unsubscribe datapoints.
The Realtime Setpoint API. With this API you can easily change the value of a datapoint.
The metadata API gives access to the variabele metadata that is saved to the Priva Cloud.
The historical data API gives access to the historical variable values that are saved to the Priva Cloud. Within a single request, one or more variables and one time range can be specified.
The Alarm API gives access to the alarm events that are saved to the Priva Cloud. Within a single request, one site and one time range can be specified.