---
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', int32 — Data change trigger
    - `DeadbandType` 'Absolute' | 'Percent', int32 — 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', int32 — 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', int32 — 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', int32 — 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', int32 — 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', int32
    - `HeartbeatBehavior` 'WatchdogLKV' | 'WatchdogLKG' | 'PeriodicLKV' | 'PeriodicLKG' | 'WatchdogLKVWithUpdatedTimestamps' | 'WatchdogLKVDiagnosticsOnly', int32 — 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', int32 — 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' | 'RawDataSets' | 'SingleRawDataSet', int32 — Message modes
  - `MessageEncoding` 'Binary' | 'Json' | 'Xml' | 'IsReversible' | 'Uadp' | 'JsonReversible' | 'IsGzipCompressed' | 'JsonGzip' | 'JsonReversibleGzip', int32 — 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', int32 — Data set routing
  - `WriterGroupQueueName` string — Writer group queue overrides the default writer group topic template to use.
  - `WriterGroupQualityOfService` 'AtMostOnce' | 'AtLeastOnce' | 'ExactlyOnce', int32
  - `WriterGroupTransport` 'IoTHub' | 'Mqtt' | 'Dapr' | 'Http' | 'FileSystem' | 'Null', int32 — Desired writer group transport
  - `UseSecurity` boolean — Secure transport should be used to connect to the opc server.
  - `OpcAuthenticationMode` 'Anonymous' | 'UsernamePassword' | 'Certificate', int32 — 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', int32
  - `WriterGroupPartitions` integer — Number of partitions to split the writer group into when publishing to target topics.
  - `NodeId` NodeIdModel — Node id serialized as object
    - `Identifier` string — Identifier

## Response `200`

Success

- PublishedNodesResponseModel — PublishNodes direct method response

## Changes

- **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/06c2bcdfa112/schema)
