> For the complete documentation index, see [llms.txt](https://docs.tricloudnexus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tricloudnexus.io/edge/nexus-modules/data-connector-modules/opcuamodule/direct-commands/getsnapshot.md).

# GetSnapshot

Calling this method triggers getting the latest OPC UA value from a list of item references.

**Method Name:**\
GetSnapshot

**Payload:**\
The payload takes a list of OPC UA items. The below example shows a case with 3 items.

```
{
  "items" : [
    "ns=3;s=ExampleItem1",
    "ns=3;s=ExampleItem2",
    "ns=3;s=ExampleItem3"
  ]
}

```

**Result**\
The direct method returns a payload, containing values for each item.

StatusCode: 0 means "Good".\
StatusCode: 2150891520 means "NodeId not defined"

```
{
    "result": [
        {
            "value": {
                "value": {
                    "Int32": {
                        "@xmlns": "http: //opcfoundation.org/UA/2008/02/Types.xsd",
                        "#text": "71"
                    }
                }
            },
            "statusCode": {
                "code": 0
            },
            "sourceTimestamp": "2022-03-18T12:16:39Z",
            "sourcePicoseconds": 0,
            "serverTimestamp": "2022-03-18T12:16:39.395Z",
            "serverPicoseconds": 0
        },
        {
            "value": {
                "value": {
                    "Double": {
                        "@xmlns": "http://opcfoundation.org/UA/2008/02/Types.xsd",
                        "#text": "-0.2163341783459245"
                    }
                }
            },
            "statusCode": {
                "code": 0
            },
            "sourceTimestamp": "2022-03-18T12:16:39Z",
            "sourcePicoseconds": 0,
            "serverTimestamp": "2022-03-18T12:16:39.395Z",
            "serverPicoseconds": 0
        },
        {
            "value": {
                "value": {
                    "Null": {
                        "@xmlns": "http://opcfoundation.org/UA/2008/02/Types.xsd"
                    }
                }
            },
            "statusCode": {
                "code": 2150891520
            },
            "sourceTimestamp": "0001-01-01T00:00:00",
            "sourcePicoseconds": 0,
            "serverTimestamp": "0001-01-01T00:00:00",
            "serverPicoseconds": 0
        }
    ],
    "diagnostics": []
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tricloudnexus.io/edge/nexus-modules/data-connector-modules/opcuamodule/direct-commands/getsnapshot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
