---
title: "AddOrUpdateNode"
method: PUT
path: "/v2/writer/{dataSetWriterGroup}/{dataSetWriterId}"
tags: ["Writer"]
---

# AddOrUpdateNode

`PUT /v2/writer/{dataSetWriterGroup}/{dataSetWriterId}`

Add a node to a dedicated data set writer in a writer group. A node must have a unique DataSetFieldId. If the field already exists, the node is updated. If a node does not have a dataset field id an error is returned. Publishing intervals at node level are also not supported and generate an error. Publishing intervals must be configured at the data set writer level.

## Path parameters

- `dataSetWriterGroup` string, required
- `dataSetWriterId` string, required

## Query parameters

- `insertAfterFieldId` string

## Request body

- OpcNodeModel — Defines configuration for monitoring an OPC UA node. Contains settings for sampling, filtering, publishing behavior, and message routing. This model allows fine-grained control over how each node's data is collected and transmitted. Part of a PublishedNodesEntryModel's OpcNodes collection.
  - `Id` string — The OPC UA node identifier string in standard notation. Format: ns={namespace};{type}={value} Required field that uniquely identifies the node to monitor. Examples: "ns=2;s=MyTag", "ns=0;i=2258" See OPC UA Part 3 for node ID format specifications.
  - `OpcSamplingInterval` integer — Server-side sampling rate in milliseconds. Determines how often the server checks for value changes. Default from DataSetSamplingInterval if not specified. Should be less than or equal to OpcPublishingInterval for effective sampling. Ignored when OpcSamplingIntervalTimespan is defined.
  - `OpcSamplingIntervalTimespan` string, date-span — Server-side sampling rate as a TimeSpan. Takes precedence over OpcSamplingInterval if both are defined. Provides more precise control over timing than milliseconds. Example: "00:00:00.100" for 100ms sampling. Should be less than or equal to OpcPublishingIntervalTimespan for effective sampling.
  - `DataSetFieldId` string — Custom identifier for this node in dataset messages. Used as field name in message payloads if specified. Falls back to DisplayName if not provided. Helps correlate data with specific measurements or tags. Must be unique within a dataset writer.
  - `DataSetClassFieldId` string, uuid — Unique identifier for correlating fields with dataset class metadata. Links monitored item data with dataset class field definitions. Used to provide context and type information for the field. Must match corresponding field ID in dataset class metadata. Important for proper message decoding by subscribers.
  - `DisplayName` string — Human-readable name for the monitored item. Used as field identifier if DataSetFieldId not specified. Can be overridden by actual node DisplayName if FetchDisplayName=true. Helps identify data sources in messages and logs. Should be unique within a dataset for clear identification.
  - `QueueSize` integer — Size of the server-side queue for this monitored item. Controls how many values can be buffered during slow connections. Values are discarded according to DiscardNew when queue is full. Default is 1 unless otherwise configured. Larger queues help prevent data loss but use more server memory.
  - `DiscardNew` boolean — Controls queue overflow behavior for monitored items. True: Discard newest values when queue is full (LIFO). False: Discard oldest values when queue is full (FIFO, default). Use True to preserve historical data during connection issues. Use False to maintain current value accuracy.
  - `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[] — 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 — 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.
    - `refreshRetainedConditionsOnStart` boolean — Issue a single ConditionRefresh when the event subscription is established (and again after a reconnect) so retained conditions already present on the server are delivered once as regular events. Unlike SnapshotInterval this does not cache conditions or periodically re-send snapshots. Ignored when SnapshotInterval is set.
  - `BrowsePath` string[] — Relative path through the address space to reach target node. Sequence of browse names from starting node to target. Example: ["Objects", "Server", "Data", "Dynamic", "Scalar"]. Allows referencing nodes through hierarchical structure. Alternative to direct node ID addressing.
  - `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 — Range specification for array or string values. Format: "start:end" or "index". Examples: "0:3" (first 4 elements), "7" (8th element) Allows monitoring specific array elements. Default: null (entire value monitored)
  - `Topic` string — Custom routing topic/queue for this node's messages. Overrides writer and writer group queue settings. Enables node-specific message routing patterns. Messages are split into separate network messages when nodes have different topics. Format depends on transport (e.g., MQTT topic syntax).
  - `QualityOfService` 'AtMostOnce' | 'AtLeastOnce' | 'ExactlyOnce'
  - `HeartbeatBehavior` 'WatchdogLKV' | 'WatchdogLKG' | 'PeriodicLKV' | 'PeriodicLKG' | 'WatchdogLKVWithUpdatedTimestamps' | 'WatchdogLKVDiagnosticsOnly' | 'Reserved' | 'PeriodicLKVDropValue' | 'PeriodicLKGDropValue' — 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.
  - `HeartbeatInterval` integer — Node-specific heartbeat interval in milliseconds. Overrides DefaultHeartbeatInterval from parent configuration. Controls how often heartbeat messages are generated. Set to 0 to disable heartbeats for this node. Ignored when HeartbeatIntervalTimespan is defined.
  - `HeartbeatIntervalTimespan` string, date-span — Node-specific heartbeat interval as TimeSpan. Takes precedence over HeartbeatInterval if both defined. Overrides DefaultHeartbeatIntervalTimespan setting. Provides more precise control over timing. Example: "00:00:10" for 10-second interval.
  - `SkipFirst` boolean — Controls handling of initial value notification. True: Suppress first value from monitored item. False: Publish initial value (default). Useful when only changes are relevant. Server always sends initial value on creation.
  - `OpcPublishingInterval` integer — Client-side publishing rate in milliseconds. Controls how often the server sends notifications. Must be >= OpcSamplingInterval for proper operation. Overrides DataSetPublishingInterval when specified. Ignored if OpcPublishingIntervalTimespan is defined.
  - `OpcPublishingIntervalTimespan` string, date-span — OpcPublishingInterval as TimeSpan.
  - `UseCyclicRead` boolean — Use periodic reads instead of monitored items. True: Sample using CyclicRead service calls False: Use standard subscription monitoring (default) Useful for nodes that don't support monitoring or when consistent sampling timing is required. Consider CyclicReadMaxAge when enabled.
  - `RegisterNode` boolean — Optimize node access using RegisterNodes service. True: Register node for faster subsequent reads False: Use direct node access (default) Can improve performance for frequently accessed nodes. Server must support RegisterNodes service.
  - `FetchDisplayName` boolean — Retrieve node's DisplayName attribute on startup. True: Query and use actual display name False: Use configured DisplayName (default) Overrides DataSetFetchDisplayNames setting. Used for human-readable field identification.
  - `ModelChangeHandling` ModelChangeHandlingOptionsModel — Describes how model changes are published
    - `rebrowseIntervalTimespan` string, date-span — Rebrowse period
  - `TriggeredNodes` OpcNodeModel[] — Collection of dependent nodes triggered by this node. Read atomically when parent node changes. Limited to one level of triggering (no cascading). Useful for maintaining data consistency between related measurements. Changes to triggered nodes must be made through parent node's API calls.
  - `CyclicReadMaxAge` integer — Maximum age for cached values in cyclic reads. Specified in milliseconds. Default: 0 (no caching) Only applies when UseCyclicRead is true. Server may return cached value if within max age. Helps reduce server load in high-frequency reads. Ignored when CyclicReadMaxAgeTimespan is defined.
  - `CyclicReadMaxAgeTimespan` string, date-span — Maximum age for cached values in cyclic reads as TimeSpan. Takes precedence over CyclicReadMaxAge if both defined. Only applies when UseCyclicRead is true. Default: "00:00:00" (no caching) Example: "00:00:00.500" for 500ms max cache age. Helps optimize read performance vs data freshness.
  - `TypeDefinitionId` string — A type definition id that references a well known opc ua type definition node for the variable represented by this node entry.
  - `MethodMetadata` MethodMetadataModel — Method metadata model
    - `objectId` string — Id of object that the method is a component of
    - `inputArguments` MethodMetadataArgumentModel[] — Input argument meta data
      - `name` string, required — Name of the argument
      - `description` string — Optional description of argument
      - `type` NodeModel, required — Node model
        - `nodeClass` 'Object' | 'Variable' | 'Method' | 'ObjectType' | 'VariableType' | 'ReferenceType' | 'DataType' | 'View' — Node class
        - `displayName` string — Display name
        - `nodeId` string, required — Id of node. (Mandatory).
        - `description` string — Description if any
        - `browseName` string — Browse name
        - `value` object — Value of variable or default value of the subtyped variable in case node is a variable type, otherwise null.
        - `sourcePicoseconds` integer — Pico seconds part of when value was read at source.
        - `sourceTimestamp` string, date-time — Timestamp of when value was read at source.
        - `serverPicoseconds` integer — Pico seconds part of when value was read at server.
        - `serverTimestamp` string, date-time — Timestamp of when value was read at server.
        - `errorInfo` ServiceResultModel — Service result
          - `statusCode` integer — Error code - if null operation succeeded.
          - `errorMessage` string — Error message in case of error or null.
          - `symbolicId` string — Symbolic identifier
          - `locale` string — Locale of the error message
          - `additionalInfo` string — Additional information if available
          - `namespaceUri` string — Namespace uri
          - `inner` ServiceResultModel — recursive
        - `accessRestrictions` 'None' | 'SigningRequired' | 'EncryptionRequired' | 'SessionRequired' — Flags that can be read or written in the AccessRestrictions attribute.
        - `writeMask` integer — Default write mask for the node (default: 0)
        - `userWriteMask` integer — User write mask for the node (default: 0)
        - `isAbstract` boolean — Whether type is abstract, if type can be abstract. Null if not type node. (default: false)
        - `containsNoLoops` boolean — Whether a view contains loops. Null if not a view.
        - `eventNotifier` 'SubscribeToEvents' | 'HistoryRead' | 'HistoryWrite' — Flags that can be set for the EventNotifier attribute.
        - `executable` boolean — If method node class, whether method can be called.
        - `userExecutable` boolean — If method node class, whether method can be called by current user. (default: false if not executable)
        - `dataTypeDefinition` object — Data type definition in case node is a data type node and definition is available, otherwise null.
        - `accessLevel` 'None' | 'CurrentRead' | 'CurrentWrite' | 'HistoryRead' | 'HistoryWrite' | 'SemanticChange' | 'StatusWrite' | 'TimestampWrite' | 'NonatomicRead' | 'NonatomicWrite' | 'WriteFullArrayOnly' — Flags that can be set for the AccessLevel attribute.
        - `userAccessLevel` 'None' | 'CurrentRead' | 'CurrentWrite' | 'HistoryRead' | 'HistoryWrite' | 'SemanticChange' | 'StatusWrite' | 'TimestampWrite' | 'NonatomicRead' | 'NonatomicWrite' | 'WriteFullArrayOnly' — Flags that can be set for the AccessLevel attribute.
        - `dataType` string — If variable the datatype of the variable. (default: null)
        - `valueRank` 'OneOrMoreDimensions' | 'OneDimension' | 'TwoDimensions' | 'ScalarOrOneDimension' | 'Any' | 'Scalar' — Constants defined for the ValueRank attribute.
        - `arrayDimensions` integer — Array dimensions of variable or variable type. (default: empty array)
        - `historizing` boolean — Whether the value of a variable is historizing. (default: false)
        - `minimumSamplingInterval` number, double — Minimum sampling interval for the variable value, otherwise null if not a variable node. (default: null)
        - `inverseName` string — Inverse name of the reference if the node is a reference type, otherwise null.
        - `symmetric` boolean — Whether the reference is symmetric in case the node is a reference type, otherwise null.
        - `rolePermissions` RolePermissionModel[] — Role permissions
          - `roleId` string, required — Identifier of the role object.
          - `permissions` 'None' | 'Browse' | 'ReadRolePermissions' | 'WriteAttribute' | 'WriteRolePermissions' | 'WriteHistorizing' | 'Read' | 'Write' | 'ReadHistory' | 'InsertHistory' | 'ModifyHistory' | 'DeleteHistory' | 'ReceiveEvents' | 'Call' | 'AddReference' | 'RemoveReference' | 'DeleteNode' | 'AddNode' — Individual permissions assigned to a role
        - `userRolePermissions` RolePermissionModel[] — User Role permissions
          - `roleId` string, required — Identifier of the role object.
          - `permissions` 'None' | 'Browse' | 'ReadRolePermissions' | 'WriteAttribute' | 'WriteRolePermissions' | 'WriteHistorizing' | 'Read' | 'Write' | 'ReadHistory' | 'InsertHistory' | 'ModifyHistory' | 'DeleteHistory' | 'ReceiveEvents' | 'Call' | 'AddReference' | 'RemoveReference' | 'DeleteNode' | 'AddNode' — Individual permissions assigned to a role
        - `typeDefinitionId` string — Optional type definition of the node
        - `children` boolean — Whether node has children which are defined as any forward hierarchical references. (default: unknown)
      - `defaultValue` object — Default value for the argument
      - `valueRank` 'OneOrMoreDimensions' | 'OneDimension' | 'TwoDimensions' | 'ScalarOrOneDimension' | 'Any' | 'Scalar' — Constants defined for the ValueRank attribute.
      - `arrayDimensions` integer — Optional Array dimension of argument
      - `errorInfo` ServiceResultModel — Service result
        - `statusCode` integer — Error code - if null operation succeeded.
        - `errorMessage` string — Error message in case of error or null.
        - `symbolicId` string — Symbolic identifier
        - `locale` string — Locale of the error message
        - `additionalInfo` string — Additional information if available
        - `namespaceUri` string — Namespace uri
        - `inner` ServiceResultModel — recursive
    - `outputArguments` MethodMetadataArgumentModel[] — output argument meta data
      - `name` string, required — Name of the argument
      - `description` string — Optional description of argument
      - `type` NodeModel, required — Node model
        - `nodeClass` 'Object' | 'Variable' | 'Method' | 'ObjectType' | 'VariableType' | 'ReferenceType' | 'DataType' | 'View' — Node class
        - `displayName` string — Display name
        - `nodeId` string, required — Id of node. (Mandatory).
        - `description` string — Description if any
        - `browseName` string — Browse name
        - `value` object — Value of variable or default value of the subtyped variable in case node is a variable type, otherwise null.
        - `sourcePicoseconds` integer — Pico seconds part of when value was read at source.
        - `sourceTimestamp` string, date-time — Timestamp of when value was read at source.
        - `serverPicoseconds` integer — Pico seconds part of when value was read at server.
        - `serverTimestamp` string, date-time — Timestamp of when value was read at server.
        - `errorInfo` ServiceResultModel — Service result
          - `statusCode` integer — Error code - if null operation succeeded.
          - `errorMessage` string — Error message in case of error or null.
          - `symbolicId` string — Symbolic identifier
          - `locale` string — Locale of the error message
          - `additionalInfo` string — Additional information if available
          - `namespaceUri` string — Namespace uri
          - `inner` ServiceResultModel — recursive
        - `accessRestrictions` 'None' | 'SigningRequired' | 'EncryptionRequired' | 'SessionRequired' — Flags that can be read or written in the AccessRestrictions attribute.
        - `writeMask` integer — Default write mask for the node (default: 0)
        - `userWriteMask` integer — User write mask for the node (default: 0)
        - `isAbstract` boolean — Whether type is abstract, if type can be abstract. Null if not type node. (default: false)
        - `containsNoLoops` boolean — Whether a view contains loops. Null if not a view.
        - `eventNotifier` 'SubscribeToEvents' | 'HistoryRead' | 'HistoryWrite' — Flags that can be set for the EventNotifier attribute.
        - `executable` boolean — If method node class, whether method can be called.
        - `userExecutable` boolean — If method node class, whether method can be called by current user. (default: false if not executable)
        - `dataTypeDefinition` object — Data type definition in case node is a data type node and definition is available, otherwise null.
        - `accessLevel` 'None' | 'CurrentRead' | 'CurrentWrite' | 'HistoryRead' | 'HistoryWrite' | 'SemanticChange' | 'StatusWrite' | 'TimestampWrite' | 'NonatomicRead' | 'NonatomicWrite' | 'WriteFullArrayOnly' — Flags that can be set for the AccessLevel attribute.
        - `userAccessLevel` 'None' | 'CurrentRead' | 'CurrentWrite' | 'HistoryRead' | 'HistoryWrite' | 'SemanticChange' | 'StatusWrite' | 'TimestampWrite' | 'NonatomicRead' | 'NonatomicWrite' | 'WriteFullArrayOnly' — Flags that can be set for the AccessLevel attribute.
        - `dataType` string — If variable the datatype of the variable. (default: null)
        - `valueRank` 'OneOrMoreDimensions' | 'OneDimension' | 'TwoDimensions' | 'ScalarOrOneDimension' | 'Any' | 'Scalar' — Constants defined for the ValueRank attribute.
        - `arrayDimensions` integer — Array dimensions of variable or variable type. (default: empty array)
        - `historizing` boolean — Whether the value of a variable is historizing. (default: false)
        - `minimumSamplingInterval` number, double — Minimum sampling interval for the variable value, otherwise null if not a variable node. (default: null)
        - `inverseName` string — Inverse name of the reference if the node is a reference type, otherwise null.
        - `symmetric` boolean — Whether the reference is symmetric in case the node is a reference type, otherwise null.
        - `rolePermissions` RolePermissionModel[] — Role permissions
          - `roleId` string, required — Identifier of the role object.
          - `permissions` 'None' | 'Browse' | 'ReadRolePermissions' | 'WriteAttribute' | 'WriteRolePermissions' | 'WriteHistorizing' | 'Read' | 'Write' | 'ReadHistory' | 'InsertHistory' | 'ModifyHistory' | 'DeleteHistory' | 'ReceiveEvents' | 'Call' | 'AddReference' | 'RemoveReference' | 'DeleteNode' | 'AddNode' — Individual permissions assigned to a role
        - `userRolePermissions` RolePermissionModel[] — User Role permissions
          - `roleId` string, required — Identifier of the role object.
          - `permissions` 'None' | 'Browse' | 'ReadRolePermissions' | 'WriteAttribute' | 'WriteRolePermissions' | 'WriteHistorizing' | 'Read' | 'Write' | 'ReadHistory' | 'InsertHistory' | 'ModifyHistory' | 'DeleteHistory' | 'ReceiveEvents' | 'Call' | 'AddReference' | 'RemoveReference' | 'DeleteNode' | 'AddNode' — Individual permissions assigned to a role
        - `typeDefinitionId` string — Optional type definition of the node
        - `children` boolean — Whether node has children which are defined as any forward hierarchical references. (default: unknown)
      - `defaultValue` object — Default value for the argument
      - `valueRank` 'OneOrMoreDimensions' | 'OneDimension' | 'TwoDimensions' | 'ScalarOrOneDimension' | 'Any' | 'Scalar' — Constants defined for the ValueRank attribute.
      - `arrayDimensions` integer — Optional Array dimension of argument
      - `errorInfo` ServiceResultModel — Service result
        - `statusCode` integer — Error code - if null operation succeeded.
        - `errorMessage` string — Error message in case of error or null.
        - `symbolicId` string — Symbolic identifier
        - `locale` string — Locale of the error message
        - `additionalInfo` string — Additional information if available
        - `namespaceUri` string — Namespace uri
        - `inner` ServiceResultModel — recursive
  - `ExpandedNodeId` string — Alternative node identifier with full namespace URI. Same as Id but uses complete namespace URI instead of index. Format: "nsu={uri};{type}={value}" Example: "nsu=http://opcfoundation.org/UA/;i=2258" Provides more portable node identification across servers.

## Response `200`

The item was added

## Other responses

- `400` — The passed in information is invalid
- `403` — A unique item could not be found to update.
- `404` — An entry was not found to add the node to

---

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