[AddOrUpdateEndpoints](./directmethods.md#addorupdateendpoints_v1)
Add or update endpoint configuration and nodes on a server. Further information is provided in the OPC Publisher documentation.
Request body
A monotonically increasing number identifying the change version. At this point the version number is informational only, but should be provided in API requests if available. Not used inside file based configuration.
The time the Publisher configuration was last updated. Read only and informational only.
The unique identifier for a data set writer used to collect OPC UA nodes to be semantically grouped and published with the same publishing interval. When not specified, uses a string representing the common publishing interval of the nodes in the data set collection. This attribute uniquely identifies a data set within a DataSetWriterGroup. The uniqueness is determined using the provided DataSetWriterId and the publishing interval of the grouped OpcNodes.
The data set writer group collecting datasets defined for a certain endpoint. This attribute is used to identify the session opened into the server. The default value consists of the EndpointUrl string, followed by a deterministic hash composed of the EndpointUrl, UseSecurity, OpcAuthenticationMode, UserName and Password attributes.
The optional dataset class id as it shall appear in dataset messages and dataset metadata. Used to uniquely identify the type of dataset being published. Default: Guid.Empty
The optional name of the dataset as it will appear in the dataset metadata. Used for identification and organization of datasets.
The publishing interval used for a grouped set of nodes under a certain DataSetWriter, expressed in milliseconds. When a specific node underneath DataSetWriter defines OpcPublishingInterval (or Timespan), its value will overwrite this interval and potentially split the data set writer into more than one subscription. Ignored when DataSetPublishingIntervalTimespan is present.
The publishing interval for a dataset writer, expressed as a TimeSpan value. Takes precedence over DataSetPublishingInterval if defined. Provides more precise control over timing than milliseconds. When overridden by node-specific intervals, the writer may split into multiple subscriptions.
Controls key frame insertion frequency in the message stream. A key frame contains all current values, while delta frames only contain changes. Setting this ensures periodic complete state updates, useful for late-joining consumers or state synchronization. Key frames can also include configured DataSetExtensionFields for additional context. Default: 0 (key frames disabled)
The interval in milliseconds at which metadata messages are sent, even when the metadata has not changed. Only applies when metadata messaging is supported or explicitly enabled. Ignored when MetaDataUpdateTimeTimespan is defined.
The interval as TimeSpan at which metadata messages are sent, even when metadata has not changed. Takes precedence over MetaDataUpdateTime if both are defined. Only applies when metadata messaging is supported or explicitly enabled.
Controls whether to send keep alive messages for this dataset when a subscription keep alive notification is received. Keep alive messages help maintain connection status awareness. Only valid if the messaging mode supports keep alive messages. Default: false
The required OPC UA server endpoint URL to connect to. This is the only required field in the configuration. Format: "opc.tcp://host:port/path"
Defines how many publishing timer expirations to wait before sending a keep-alive message when no notifications are pending. Works with SendKeepAliveDataSetMessages to maintain connection awareness. Keep-alive messages help detect connection issues even when no data changes are occurring.
The optional description of the dataset.
Priority of the writer subscription.
Optional key-value pairs inserted into key frame and metadata messages in the same data set. Values are formatted using OPC UA Variant JSON encoding. Used to add contextual information to datasets.
Specifies the security mode for OPC UA endpoint connections. Determines how messages are protected during transmission between the Publisher and OPC UA servers. Proper security mode selection is crucial for protecting sensitive data and credentials.
The security policy URI to use for the endpoint connection. Overrides UseSecurity setting and refines EndpointSecurityMode choice. Examples include "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256". If the specified policy is not available with the chosen security mode, connectivity will fail. This allows enforcing specific security requirements.
Defines how OPC UA Publisher formats and structures messages for transport. Each mode provides different trade-offs between message completeness, bandwidth efficiency, and compatibility with different message consumers.
Specifies the encoding format for OPC UA Publisher messages. Can be combined with compression and reversibility flags to control message format characteristics.
The number of notifications that are queued before a network message is generated. Controls message batching for optimizing network traffic vs latency. For historic reasons the default value is 50 unless otherwise configured via the --bs command line option.
The interval at which batched network messages are published, in milliseconds. Messages are published when this interval elapses or when BatchSize is reached. For historic reasons the default is 10 seconds unless configured via --bi. Ignored when BatchTriggerIntervalTimespan is specified. Used with BatchSize to optimize network traffic vs latency.
The interval at which batched network messages are published, as a TimeSpan. Takes precedence over BatchTriggerInterval if both are defined. Messages are published when this interval elapses or when BatchSize is reached. Provides more precise control over publishing timing than millisecond interval. Used with BatchSize to optimize network traffic vs latency.
Use reverse connect to connect ot the endpoint
Specifies how OPC UA node paths are mapped to message routing paths/topics. Controls automatic topic structure generation from OPC UA address space. Used to create a unified namespace when publishing to message brokers that support hierarchical routing like MQTT.
Overrides the default writer group topic template for message routing. Used to customize where messages from this writer group are published. Particularly useful when publishing to MQTT topics or message queues where specific routing patterns are needed.
Specifies the transport technology used to publish messages from OPC Publisher. Each transport offers different capabilities for message delivery, routing, and quality of service. The transport choice affects how messages are delivered and what features are available.
Controls whether to use a secure OPC UA transport mode to establish a session. When true, defaults to SecurityMode.NotNone which requires signed or encrypted communication. When false, uses SecurityMode.None with no security. Can be overridden by EndpointSecurityMode and EndpointSecurityPolicy settings. Use encrypted communication whenever possible to protect credentials and data.
Specifies the authentication method used to connect to OPC UA servers. The chosen mode determines how the Publisher authenticates itself to servers. When using credentials or certificates, encrypted communication should be enabled via UseSecurity or EndpointSecurityMode to protect authentication secrets.
The encrypted username for authentication when OpcAuthenticationMode is UsernamePassword. Encrypted credentials at rest can be enforced using the --fce command line option. Version 2.6+ stores credentials in plain text by default, while 2.5 and below always encrypted them.
The encrypted password for authentication when OpcAuthenticationMode is UsernamePassword. For certificate authentication, contains the password to access the private key. Encrypted credentials at rest can be enforced using the --fce command line option. Version 2.6+ stores credentials in plain text by default, while 2.5 and below always encrypted them.
The plaintext username for UsernamePassword authentication, or the subject name of the certificate for Certificate authentication. When using Certificate mode, this refers to a certificate in the User certificate store of the PKI configuration.
The plaintext password for UsernamePassword authentication, or the password protecting the private key for Certificate authentication. For Certificate mode, this must match the password used when adding the certificate to the PKI store.
Overrides the writer group queue name at the individual writer level. When specified, causes network messages to be split across different queues. The split also takes QoS settings into account, allowing fine-grained control over message routing and delivery guarantees.
The queue name to use for metadata messages from this writer. Overrides the default metadata topic template. Allows routing metadata to specific destinations separate from data messages.
Specifies how many partitions to split the writer group into when publishing to target topics. Used to distribute message load and enable parallel processing by consumers. Default is 1 partition. Particularly useful for high-throughput scenarios or when using partitioned queues/topics in the messaging system.
Controls whether subscription transfer is disabled during reconnect. When false (default), attempts to transfer subscriptions on reconnect to maintain data continuity. Set to true to fix interoperability issues with servers that don't support subscription transfer. Can be configured globally via command line options.
Controls whether to republish missed values after a subscription is transferred during reconnect handling. Only applies when DisableSubscriptionTransfer is false. Helps ensure no data is lost during connection interruptions. Default: true
The timeout duration used to monitor whether monitored items in the subscription are continuously reporting fresh data. This watchdog mechanism helps detect stale data or connectivity issues. When this timeout expires, the configured DataSetWriterWatchdogBehavior is triggered based on OpcNodeWatchdogCondition. Expressed as a TimeSpan value.
Defines how the publisher responds when monitored items stop reporting data. The watchdog triggers when items are late according to OpcNodeWatchdogTimespan and OpcNodeWatchdogCondition settings. Can be configured globally via the --dwb command line option.
Defines the conditions that trigger the subscription watchdog behavior. Works in conjunction with OpcNodeWatchdogTimespan to determine when nodes are considered "late" and DataSetWriterWatchdogBehavior to define the response. Can be configured globally via the --mwc command line option.
Default sampling interval in milliseconds for all monitored items in the dataset. Used if individual nodes don't specify their own sampling interval. Follows OPC UA specification for sampling behavior. Ignored when DataSetSamplingIntervalTimespan is present. Defaults to value configured via --oi command line option.
Default sampling interval as TimeSpan for all monitored items in the dataset. Takes precedence over DataSetSamplingInterval if both are defined. Used if individual nodes don't specify their own sampling interval. Provides more precise control over sampling timing. Follows OPC UA specification for sampling behavior.
Controls whether to fetch display names of monitored variable nodes and use those inside messages as field names. When true, fetches display names for all nodes. If false, uses DisplayName value if provided; if not provided, uses the node id. Can be configured via --fd command line option.
Time-to-live duration for messages sent through the writer group. Only applied if the transport technology supports message TTL. After this duration expires, messages may be discarded by the messaging system. Used to prevent stale data from being processed by consumers.
Controls whether messages should be retained by the messaging system. Only applied if the transport technology supports message retention. When true, messages are kept by the broker even after delivery. Useful for late-joining subscribers to receive the last known values.
Time-to-live duration for messages sent by this specific writer. Overrides WriterGroupMessageTtlTimespan at the individual writer level. Only applied if the transport technology supports message TTL. Allows different TTL settings for different types of data.
Controls message retention for this specific writer. Overrides WriterGroupMessageRetention at the individual writer level. Only applied if the transport technology supports retention. Together with QueueName, allows splitting messages across different queues with different retention policies.
The interval in milliseconds at which to publish heartbeat messages. Heartbeat acts like a watchdog that fires after this interval has passed and no new value has been received. A value of 0 disables heartbeat. Ignored when DefaultHeartbeatIntervalTimespan is defined. See heartbeat.md for detailed behavior documentation.
The heartbeat interval as TimeSpan for all nodes in this dataset. Takes precedence over DefaultHeartbeatInterval if defined. Controls how often heartbeat messages are published when no value changes occur.
Controls how heartbeat messages are handled for monitored items. Heartbeats help maintain awareness of node state and connection health even when values don't change. Can be configured globally via the --hbb command line option. Works with heartbeat interval settings.
Contains an uri identifier that allows correlation of the writer data set source into other systems. Will be used as part of cloud events header if enabled.
Contains an identifier that allows correlation of the writer group into other systems in the context of the source. Will be used as part of cloud events header if enabled.
Additional properties of the writer group that should be retained with the configuration.
A type definition id that references a well known opc ua type definition node for the dataset represented by this entry. If set it is used in context of cloud events to specify a concrete type of dataset message in the cloud events type header.
A root node that all nodes that use a non rooted browse paths in the dataset should start from.
A node that represents the writer group in the server address space. This is the instance id of the root node from which all datasets originate. It is informational only and would not need to be configured
A type that is attached to the writer group and explains the shape of the writer group. It is the type definition id of the writer group root node id. It is informational only and would not need to be configured
Metadata retention setting for the dataset writer.
Metadata time-to-live duration for the dataset writer.
When sending of keep alive messages is enabled, this flag controls whether the keep alive messages are sent as key frames. Key frames contain all current values.
Set a publisher id to use that is different form the global publisher identity.
Pass connection string for the transport layer. This works for transports that support connection strings such as IoT Hub or Event Hubs. It enables overriding the default connection string configured for the publisher. The transport must be configured using the command line options first, and can be overriden here. If it is not configured on the command line first, the setting here is ignored.
Enables detailed server diagnostics logging for the connection. When enabled, provides additional diagnostic information useful for troubleshooting connectivity, authentication, and subscription issues. The diagnostics data is included in the publisher's logs. Default: false
Response
The operation was successful.
PublishNodes direct method response