---
title: "[AddOrUpdateEndpoints](./directmethods.md#addorupdateendpoints_v1)"
method: PATCH
path: "/v2/configuration"
tags: ["Configuration"]
---

# \[AddOrUpdateEndpoints\](./directmethods.md#addorupdateendpoints_v1)

`PATCH /v2/configuration`

Add or update endpoint configuration and nodes on a server. Further information is provided in the OPC Publisher documentation.

## Request body

- PublishedNodesEntryModel[]
  - `Version` integer — Version number of the entry
  - `LastChangeDateTime` string, date-time — Last change to the entry
  - `DataSetWriterId` string — Name of the data set writer.
  - `DataSetWriterGroup` string — The Group the writer belongs to.
  - `OpcNodes` OpcNodeModel[] — Nodes defined in the collection.
    - `Id` string — Node Identifier
    - `OpcSamplingInterval` integer — Sampling interval in milliseconds
    - `OpcSamplingIntervalTimespan` string, date-span — OpcSamplingInterval as TimeSpan.
    - `DataSetFieldId` string — The identifier of the field in the dataset message. If not provided Azure.IIoT.OpcUa.Publisher.Models.OpcNodeModel.DisplayName is used.
    - `DataSetClassFieldId` string, uuid — The identifier of the field in the dataset class. Allows correlation to the data set class.
    - `DisplayName` string — Display name
    - `QueueSize` integer — Queue Size for the monitored item on the server. Specifies how many values are queued on the server before undelivered ones are discarded.
    - `DiscardNew` boolean — Discard new values in the server queue instead of old values when no more room in queue.
    - `DataChangeTrigger` 'Status' | 'StatusValue' | 'StatusValueTimestamp' — Data change trigger
    - `DeadbandType` 'Absolute' | 'Percent' — Deadband type
    - `DeadbandValue` number, double — Deadband value of the data change filter to apply. Does not apply to events
    - `EventFilter` EventFilterModel — Event filter
      - `selectClauses` SimpleAttributeOperandModel[], required — Select clauses
        - `typeDefinitionId` string — Type definition node id if operand is simple or full attribute operand.
        - `browsePath` string[] — Browse path of attribute operand
        - `attributeId` 'NodeId' | 'NodeClass' | 'BrowseName' | 'DisplayName' | 'Description' | 'WriteMask' | 'UserWriteMask' | 'IsAbstract' | 'Symmetric' | 'InverseName' | 'ContainsNoLoops' | 'EventNotifier' | 'Value' | 'DataType' | 'ValueRank' | 'ArrayDimensions' | 'AccessLevel' | 'UserAccessLevel' | 'MinimumSamplingInterval' | 'Historizing' | 'Executable' | 'UserExecutable' | 'DataTypeDefinition' | 'RolePermissions' | 'UserRolePermissions' | 'AccessRestrictions' — Node attribute identifiers
        - `indexRange` string — Index range of attribute operand
        - `displayName` string — Optional display name
        - `dataSetClassFieldId` string, uuid — Optional data set class field id (Publisher extension)
      - `whereClause` ContentFilterModel, required — Content filter
        - `elements` ContentFilterElementModel[] — The flat list of elements in the filter AST
          - `filterOperator` 'Equals' | 'IsNull' | 'GreaterThan' | 'LessThan' | 'GreaterThanOrEqual' | 'LessThanOrEqual' | 'Like' | 'Not' | 'Between' | 'InList' | 'And' | 'Or' | 'Cast' | 'InView' | 'OfType' | 'RelatedTo' | 'BitwiseAnd' | 'BitwiseOr' — Filter operator type
          - `filterOperands` FilterOperandModel[] — The operands in the element for the operator
            - `index` integer — Element reference in the outer list if operand is an element operand
            - `value` object — Variant value if operand is a literal
            - `nodeId` string — Type definition node id if operand is simple or full attribute operand.
            - `browsePath` string[] — Browse path of attribute operand
            - `attributeId` 'NodeId' | 'NodeClass' | 'BrowseName' | 'DisplayName' | 'Description' | 'WriteMask' | 'UserWriteMask' | 'IsAbstract' | 'Symmetric' | 'InverseName' | 'ContainsNoLoops' | 'EventNotifier' | 'Value' | 'DataType' | 'ValueRank' | 'ArrayDimensions' | 'AccessLevel' | 'UserAccessLevel' | 'MinimumSamplingInterval' | 'Historizing' | 'Executable' | 'UserExecutable' | 'DataTypeDefinition' | 'RolePermissions' | 'UserRolePermissions' | 'AccessRestrictions' — Node attribute identifiers
            - `indexRange` string — Index range of attribute operand
            - `alias` string — Optional alias to refer to it makeing it a full blown attribute operand
            - `dataType` string — Data type if operand is a literal
      - `typeDefinitionId` string — Simple event Type definition node id
    - `ConditionHandling` ConditionHandlingOptionsModel — Condition handling options model
      - `updateInterval` integer — Time interval for sending pending interval updates in seconds.
      - `snapshotInterval` integer — Time interval for sending pending interval snapshot in seconds.
    - `BrowsePath` string[] — Browse path from the node to reach the actual node to monitor.
    - `AttributeId` 'NodeId' | 'NodeClass' | 'BrowseName' | 'DisplayName' | 'Description' | 'WriteMask' | 'UserWriteMask' | 'IsAbstract' | 'Symmetric' | 'InverseName' | 'ContainsNoLoops' | 'EventNotifier' | 'Value' | 'DataType' | 'ValueRank' | 'ArrayDimensions' | 'AccessLevel' | 'UserAccessLevel' | 'MinimumSamplingInterval' | 'Historizing' | 'Executable' | 'UserExecutable' | 'DataTypeDefinition' | 'RolePermissions' | 'UserRolePermissions' | 'AccessRestrictions' — Node attribute identifiers
    - `IndexRange` string — Index range to read, default to null.
    - `Topic` string — Topic to publish to - splits network messages along the lines of topic name and overrides the queue name of the writer and writer group.
    - `QualityOfService` 'AtMostOnce' | 'AtLeastOnce' | 'ExactlyOnce'
    - `HeartbeatBehavior` 'WatchdogLKV' | 'WatchdogLKG' | 'PeriodicLKV' | 'PeriodicLKG' | 'WatchdogLKVWithUpdatedTimestamps' | 'WatchdogLKVDiagnosticsOnly' — Heartbeat behavior
    - `HeartbeatInterval` integer — Heartbeat interval in seconds
    - `HeartbeatIntervalTimespan` string, date-span — Heartbeat interval as TimeSpan.
    - `SkipFirst` boolean — Do not send the first value that is always provided by the server when the monitored item is created.
    - `OpcPublishingInterval` integer — Publishing interval in milliseconds
    - `OpcPublishingIntervalTimespan` string, date-span — OpcPublishingInterval as TimeSpan.
    - `UseCyclicRead` boolean — Use cyclic read to sample.
    - `RegisterNode` boolean — Register node for reading before sampling.
    - `FetchDisplayName` boolean — Fetch display name from the node
    - `ModelChangeHandling` ModelChangeHandlingOptionsModel — Describes how model changes are published
      - `rebrowseIntervalTimespan` string, date-span — Rebrowse period
    - `TriggeredNodes` OpcNodeModel[] — Nodes that are triggered by the parent node. Nodes cannot themselves trigger other nodes, any such setting is silently discarded. Triggered nodes can only be updated as an atomic unit using API.
    - `ExpandedNodeId` string — Expanded Node identifier (same as Azure.IIoT.OpcUa.Publisher.Models.OpcNodeModel.Id)
  - `DataSetClassId` string, uuid — A dataset class id.
  - `DataSetName` string — The optional short name of the dataset.
  - `DataSetPublishingInterval` integer — The Publishing interval for a dataset writer in miliseconds.
  - `DataSetPublishingIntervalTimespan` string, date-span — The Publishing interval for a dataset writer in timespan format. Takes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.DataSetPublishingInterval if defined.
  - `DataSetKeyFrameCount` integer — Insert a key frame every x messages
  - `MetaDataUpdateTime` integer — Send metadata at the configured interval even when not changing expressed in milliseconds.
  - `MetaDataUpdateTimeTimespan` string, date-span — Send metadata at the configured interval even when not changing expressed as duration. Takes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.MetaDataUpdateTimeif defined.
  - `SendKeepAliveDataSetMessages` boolean — Send a keep alive message when a subscription keep alive notification is received inside the writer. If keep alive messages are not supported by the messaging profile chosen this value is ignored.
  - `EndpointUrl` string, required — The endpoint URL of the OPC UA server.
  - `MaxKeepAliveCount` integer — When the publishing timer has expired this number of times without requiring any Notification to be sent, to the writer a keep-alive message is sent.
  - `DataSetDescription` string — The optional description of the dataset.
  - `Priority` integer — Priority of the writer subscription.
  - `DataSetExtensionFields` object — Optional field and value pairs to insert into the data sets emitted by data set writer.
  - `EndpointSecurityMode` 'Best' | 'Sign' | 'SignAndEncrypt' | 'None' | 'NotNone' — Security mode of endpoint
  - `EndpointSecurityPolicy` string — The specific security policy to use for the specified endpoint. Overrides Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.UseSecurity setting. If the security policy is not available with the specified security mode connectivity will fail.
  - `MessagingMode` 'PubSub' | 'Samples' | 'FullNetworkMessages' | 'FullSamples' | 'DataSetMessages' | 'SingleDataSetMessage' | 'DataSets' | 'SingleDataSet' | 'RawDataSets' | 'SingleRawDataSet' — Message modes
  - `MessageEncoding` 'Uadp' | 'Json' | 'Xml' | 'Avro' | 'IsReversible' | 'JsonReversible' | 'IsGzipCompressed' | 'JsonGzip' | 'AvroGzip' | 'JsonReversibleGzip' — Message encoding
  - `BatchSize` integer — Send network messages when the notification queue exceeds this number. Causes this many notifications to be added to network messages
  - `BatchTriggerInterval` integer — Send network messages at the specified publishing interval.
  - `BatchTriggerIntervalTimespan` string, date-span — Send network messages at the specified publishing interval. Takes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.BatchTriggerInterval if defined.
  - `UseReverseConnect` boolean — Use reverse connect to connect ot the endpoint
  - `DataSetRouting` 'None' | 'UseBrowseNames' | 'UseBrowseNamesWithNamespaceIndex' — Data set routing
  - `WriterGroupQueueName` string — Writer group queue overrides the default writer group topic template to use.
  - `WriterGroupQualityOfService` 'AtMostOnce' | 'AtLeastOnce' | 'ExactlyOnce'
  - `WriterGroupTransport` 'IoTHub' | 'Mqtt' | 'EventHub' | 'Dapr' | 'Http' | 'FileSystem' | 'Null' — Desired writer group transport
  - `UseSecurity` boolean — Secure transport should be used to connect to the opc server.
  - `OpcAuthenticationMode` 'Anonymous' | 'UsernamePassword' | 'Certificate' — Enum that defines the authentication method
  - `EncryptedAuthUsername` string — encrypted username
  - `EncryptedAuthPassword` string — encrypted password
  - `OpcAuthenticationUsername` string — plain username
  - `OpcAuthenticationPassword` string — plain password
  - `QueueName` string — Writer queue overrides the writer group queue name. Network messages are then split across queues with Qos also accounted for.
  - `MetaDataQueueName` string — Meta data queue name to use for the writer. Overrides the default metadata topic template.
  - `QualityOfService` 'AtMostOnce' | 'AtLeastOnce' | 'ExactlyOnce'
  - `WriterGroupPartitions` integer — Number of partitions to split the writer group into when publishing to target topics.
  - `DisableSubscriptionTransfer` boolean — Disable subscription transfer on reconnect
  - `RepublishAfterTransfer` boolean — Republish after transferring the subscription during reconnect handling unless subscription transfer was disabled.
  - `OpcNodeWatchdogTimespan` string, date-span — The timeout to use to monitor the monitored items in the subscription are continously reporting fresh data.
  - `DataSetWriterWatchdogBehavior` 'Diagnostic' | 'Reset' | 'FailFast' | 'ExitProcess' — Subscription watchdog behavior
  - `OpcNodeWatchdogCondition` 'WhenAllAreLate' | 'WhenAnyIsLate' — Monitored item watchdog condition
  - `DataSetSamplingInterval` integer — The default sampling interval for all items in a dataset writer in miliseconds if the nodes do not specify a sampling rate.
  - `DataSetSamplingIntervalTimespan` string, date-span — The Sampling interval for the nodes in the dataset writer in timespan format. Takes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.DataSetSamplingInterval if defined.
  - `DataSetFetchDisplayNames` boolean — Whether to fetch the display name and use it as data set id for all opc node items in the data set
  - `WriterGroupMessageTtlTimepan` string, date-span — Default time to live for messages sent through the writer group if the transport supports it.
  - `WriterGroupMessageRetention` boolean — Default message retention setting for messages sent through the writer group if the transport supports it.
  - `MessageTtlTimespan` string, date-span — Message time to live for messages sent by the writer if the transport supports it.
  - `MessageRetention` boolean — Message retention setting for messages sent by the writer if the transport supports it.
  - `DefaultHeartbeatInterval` integer — Default heartbeat interval in milliseconds
  - `DefaultHeartbeatIntervalTimespan` string, date-span — Default heartbeat interval for all nodes as duration. Takes precedence over Azure.IIoT.OpcUa.Publisher.Models.PublishedNodesEntryModel.DefaultHeartbeatInterval if defined.
  - `DefaultHeartbeatBehavior` 'WatchdogLKV' | 'WatchdogLKG' | 'PeriodicLKV' | 'PeriodicLKG' | 'WatchdogLKVWithUpdatedTimestamps' | 'WatchdogLKVDiagnosticsOnly' — Heartbeat behavior
  - `DumpConnectionDiagnostics` boolean — Dump server diagnostics for the connection to enable advanced troubleshooting scenarios.
  - `NodeId` NodeIdModel — Node id serialized as object
    - `Identifier` string — Identifier

## Response `200`

The operation was successful.

- PublishedNodesResponseModel — PublishNodes direct method response

## Other responses

- `404` — The endpoint was not found to add to
- `408` — The operation timed out.
- `500` — An unexpected error occurred

## Changes

- **2024-06-29** `bfba75adb807` — 3 info
  - added the non-success response with the status `404`
  - added the non-success response with the status `408`
  - added the non-success response with the status `500`
- **2023-06-12** `d4f4e58029fb` — 2 info
  - api tag `Configuration` added
  - api tag `PublisherMethods` removed
- **2023-05-18** `9bd1387156df` — 1 info
  - endpoint added
- **2023-05-02** `e285a38b6ca1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/azure/apis/opcpublisher/changes/v2/configuration/patch.md)

---

[API](https://skmtc.dev/azure/apis/opcpublisher.md) · [All operations](https://skmtc.dev/azure/apis/opcpublisher/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/opcpublisher/revisions/eeda0fd8cbae/schema)
