HTTP Publisher Tag

Writes a specified body to an HTTP POST message. The contents of the body may be JSON, XML or other formats.

Each POST to the server will correspond to a single tag or alarm update from VTScada. The authentication methods available include basic authentication, a custom token and OAuth 2.0.

Only the current VTScada RPC service server will publish to the server. All other potential servers will handle registration of publishable tags but not enable publishing until taking over as the primary for the publisher service.

A successful publish operation sets the tag value to 0. On failure, the tag value is set to the returned HTTP status code, which indicates the cause of the failure. Administrators can use this value to troubleshoot communication or server issues.

 

HTTP Publisher Properties Connect Tab

Server

The name of the host for the server.

Port

The port number for the server.

Enable SSL/TLS

Option to enable SSL/TLS. Required for TLS (secured) connections. (Recommended)

Timeout

Time to wait for a response, in seconds. On timeout, the tag retries up to 3 times before giving up.

Maximum connections

The maximum number of concurrent keep-alive connections to maintain per server-port. The default is 1.

Content Type

The media format of the content. The field to the right will display the header value generated per content type. This string is sent to the server, identifying the format of the message body. Selecting the option "other" from the drop-down list will enable editing of the header value field.

  • JSON (Default)
  • XML
  • Other

HTTP Publisher Properties Authentication Tab

This is where you configure your HTTP authentication header. There are three Authentication Methods to choose from and each one will change the configuration options.

Basic Authentication (Default)

Set the username and password expected from the client.

Custom Token

Set the header name of the custom token and the custom token value expected from the client.

OAuth 2.0

Select a configured grant and consent or revoke consent from this tab. See OAuth 2.0 Protocol for more information about configuring OAuth 2.0 with a Client Credential flow in VTScada.

 

HTTP Publisher Data Properties Tab

When the associated I/O tag changes, the URL path and payload will be encoded based on the settings here. You can use the built-in encoder to replace content-using Placeholder Syntax. The Alarm Properties tab will be configured in a similar manner, however, Data Properties are for value changes while Alarm Properties will be for Alarm Triggers.

Publish

The tag will publish data when Publish is enabled, and stop publishing data when Publish is disabled. Publish is enabled by default. Disabling this setting is handy during configuration, commissioning and troubleshooting.

URL Path

The URL path portion of the URL. This field supports using placeholder syntax for dynamic configuration.

Payload

The payload of an HTTP POST is the information that you want the client to receive and process, wrapped inside a POST request. This field supports using placeholder syntax for dynamic configuration.

HTTP Publisher Alarm Properties Tab

Alarm Properties are configured the same way as Data Properties. When the associated I/O tag changes, the URL path and payload will be encoded based on the settings here. You can use the built-in encoder to replace content-using Placeholder Syntax. Alarm Properties are for alarm triggers, while Data Properties are for value changes.

Publish

The tag will publish data when Publish is enabled, and stop publishing data when Publish is disabled. Publish is enabled by default. Disabling this setting is handy during configuration, commissioning and troubleshooting.

URL Path

The URL path portion of the URL. This field supports using placeholder syntax for dynamic configuration.

Payload

The payload of an HTTP POST is the information that you want the client to receive and process, wrapped inside a POST request. This field supports using placeholder syntax for dynamic configuration.

HTTP Publisher Extra HTTP Headers Tab

Some APIs may require extra information such as tokens or form data. Use this tab to specify name = value pairs to be added to the header. Values may be specified here or supplied from expressions or tags.

Placeholder Syntax

VTScada's HTTP Publisher tag has a built-in encoder that will handle value substitution using named placeholders. Named placeholders will be supported for accessing information from the published information structure, values in scope of the publisher, and values in scope of the publishing tag.

To distinguish the named placeholder from other potential elements, the placeholder will be wrapped in square brackets with a preceding percent sign (%[TYPE:Variable]).

A valid example of placeholders being used to configure the destination and payload in the event of a change in value.

There are three types that represent the intended scope (TAG, PUB, CFG), and one type that represents a structure (DAT).

  • TAG - the data is from an IO tag.
  • PUB - the data is from the Publisher.
  • CFG - the data is from the static tag configuration details

These three types will take the following variables:

  • Name
  • Area
  • Description
  • DataType
  • DisplayAddress
  • Units
  • SourceName
  • IsCalculation
  • ExpectedMin
  • ExpectedMax
  • ScaledMin
  • ScaledMax

DAT Represents the structure being sent when a tag value changes. This type also serves as the dictionary for the Alarm when rendering templates. The following variables are accepted:

  • Value
  • Timestamp
  • Attributes
  • RawValue
  • ValueType

In the Alarm Properties tab (concerning Alarm Triggers), DAT may reference a dictionary. The top-level of the dictionary represents each alarm level and contains Alarm Names and Status information. Available alarms vary depending on the tag type:

OAuth 2.0 Protocol