---
title: "ValueRead"
method: POST
path: "/v2/read"
tags: ["General"]
---

# ValueRead

`POST /v2/read`

Read the value of a variable node. This uses the service detailed in the <a href="https://reference.opcfoundation.org/Core/Part4/v105/docs/5.10.1"> relevant section of the OPC UA reference specification</a>.

## Request body

- ValueReadRequestModelRequestEnvelope — 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` ValueReadRequestModel, required — Request node value read
    - `nodeId` string — Node to read from (mandatory)
    - `browsePath` string[] — An optional path from NodeId instance to an actual node.
    - `indexRange` string — Index range to read, e.g. 1:2,0:1 for 2 slices out of a matrix or 0:1 for the first item in an array, string or bytestring. See 7.22 of part 4: NumericRange.
    - `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)
    - `maxAge` string, date-span — Maximum age of the value to be read in milliseconds. The age of the value is based on the difference between the ServerTimestamp and the time when the Server starts processing the request. If not supplied, the Server shall attempt to read a new value from the data source.
    - `timestampsToReturn` 'Both' | 'Source' | 'Server' | 'None', int32 — Timestamps

## Response `200`

Success

- ValueReadResponseModel — Value read response model
  - `value` unknown
  - `dataType` string — Built in data type of the value read.
  - `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

## Changes

- **2023-06-12** `d4f4e58029fb` — 2 info
  - api tag `General` added
  - api tag `TwinMethods` removed
- **2023-05-02** `e285a38b6ca1` — 5 info
  - api tag `TwinMethods` added
  - api tag `General` 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/read/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)
