---
title: "HistoryReplaceValues"
method: POST
path: "/v2/history/values/replace"
tags: ["History"]
---

# HistoryReplaceValues

`POST /v2/history/values/replace`

Replace value change entries in a timeseries of the server historian. See <a href="https://reference.opcfoundation.org/Core/Part11/v104/docs/"> the relevant section of the OPC UA reference specification</a> and <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.5"> respective service documentation</a> for more information.

## Request body

- UpdateValuesDetailsModelHistoryUpdateRequestModelRequestEnvelope — Wraps a request and a connection to bind to a body more easily for api that requires a connection endpoint
  - `connection` ConnectionModel, required — Connection model
    - `endpoint` EndpointModel — Endpoint model
      - `url` string — Endpoint url to use to connect with
      - `alternativeUrls` string[] — Alternative endpoint urls that can be used for accessing and validating the server
      - `securityMode` 'Best' | 'Sign' | 'SignAndEncrypt' | 'None', int32 — Security mode of endpoint
      - `securityPolicy` string — Security policy uri to use for communication. default to best.
      - `certificate` string — Endpoint certificate thumbprint
    - `user` CredentialModel — Credential model
      - `type` 'None' | 'UserName' | 'X509Certificate' | 'JwtToken', int32 — Type of credentials to use for authentication
      - `value` unknown
    - `diagnostics` DiagnosticsModel — Diagnostics configuration
      - `level` 'None' | 'Status' | 'Information' | 'Debug' | 'Verbose', int32 — Level of diagnostics requested in responses
      - `auditId` string — Client audit log entry. (default: client generated)
      - `timeStamp` string, date-time — Timestamp of request. (default: client generated)
    - `group` string — Connection group allows splitting connections per purpose.
  - `request` UpdateValuesDetailsModelHistoryUpdateRequestModel, required — Request node history update
    - `nodeId` string, required — Node to update
    - `browsePath` string[] — An optional path from NodeId instance to the actual node.
    - `details` UpdateValuesDetailsModel, required — Insert, upsert, or update historic values
      - `values` HistoricValueModel[], required — Values to insert
        - `value` unknown
        - `dataType` string — Built in data type of the updated values
        - `status` 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
        - `sourceTimestamp` string, date-time — The source timestamp associated with the value.
        - `sourcePicoseconds` integer — Additional resolution for the source timestamp.
        - `serverTimestamp` string, date-time — The server timestamp associated with the value.
        - `serverPicoseconds` integer — Additional resolution for the server timestamp.
        - `dataLocation` 'Raw' | 'Calculated' | 'Interpolated', int32 — Indicate the data location
        - `modificationInfo` ModificationInfoModel — Modification information
          - `modificationTime` string, date-time — Modification time
          - `updateType` 'Insert' | 'Replace' | 'Update' | 'Delete', int32 — History update type
          - `userName` string — User who made the change
        - `additionalData` 'None' | 'Partial' | 'ExtraData' | 'MultipleValues', int32 — Flags that are set by the historian when returning archived values.
    - `header` RequestHeaderModel — Request header model
      - `elevation` CredentialModel — Credential model
        - `type` 'None' | 'UserName' | 'X509Certificate' | 'JwtToken', int32 — Type of credentials to use for authentication
        - `value` unknown
      - `locales` string[] — Optional list of locales in preference order.
      - `diagnostics` DiagnosticsModel — Diagnostics configuration
        - `level` 'None' | 'Status' | 'Information' | 'Debug' | 'Verbose', int32 — Level of diagnostics requested in responses
        - `auditId` string — Client audit log entry. (default: client generated)
        - `timeStamp` string, date-time — Timestamp of request. (default: client generated)

## Response `200`

Success

- HistoryUpdateResponseModel — History update results
  - `results` ServiceResultModel[] — List of results from the update operation
    - `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
  - `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

## Changes

- **2023-06-12** `d4f4e58029fb` — 2 info
  - api tag `History` added
  - api tag `HistoryMethods` removed
- **2023-05-02** `e285a38b6ca1` — 5 info
  - api tag `HistoryMethods` added
  - api tag `History` removed
  - removed the non-success response with the status `400`
  - removed the non-success response with the status `408`
  - …1 more

[Change history](https://skmtc.dev/azure/apis/opcpublisher/changes/v2/history/values/replace/post.md)

---

[API](https://skmtc.dev/azure/apis/opcpublisher.md) · [All operations](https://skmtc.dev/azure/apis/opcpublisher/llms.txt) · [OpenAPI document](https://skmtc.dev/azure/apis/opcpublisher/revisions/d4f4e58029fb?raw)
