We provide an API via Web-Service that can read and write tag values. To access the tags, a login is required for solution users. You can directly access this API through HTTP (REST API) connecting with a runtime system.
This page presents information about how to use the WebAccess REST API.
On this page:
The Web-Server URLs have the following URL syntax "http://<IPAddress>/<ProductVersion>/WebAccessService.svc/<ContractMethod>" where the contract methods are described below.
Gets the service version.
Syntax:
{"GetVersionResult":2} |
Logs in project user. Parameters:
Syntax:
{ "LoginResult": { "Handle": 2, "Status": "" } } Returns the connection handle (whether >= 0) or error code (whether < 0). |
Logs out project user. Parameters:
Syntax:
{ "LogoutResult": 0 } 0: OK, 1: Invalid connection handle. |
Reads value from specified object. Parameters:
Syntax:
{ "ReadObjectResult": { "ObjectName": "tagExample", "Quality": 64, "UtcTimeStamp": "11/29/2019 17:33:47", "Value": "0" } } Returns Value of the object. |
Read value from a list of objects. Parameters:
Syntax:
{ "handle" : 1, "objectNames" :["tagExample1", "tagExample2"]} |
4. Response Example:
{ "ReadObjectResult": { "ObjectName": "tagExample1", "Quality": 192, "UtcTimeStamp": "02/12/2021 11:13:38", "Value": "20" }, { "ObjectName": "tagExample2", "Quality": 192, "UtcTimeStamp": "02/12/2021 11:13:36", "Value": "10" } } Returns Value of the objects. |
Write value to specified object. Parameters:
Syntax:
{ "handle" : 1, "item" : { "ObjectName": "tagExample2", "Quality": 192, "UtcTimeStamp": "02/12/2021 11:13:36", "Value": "2" } "force": false} |
4. Response Example:
"WriteObjectResult": true Returns Flag indicating success or fail. |
Write value to specified object. Parameters:
Syntax:
{ "handle" : 1, "itens" : [{ "ObjectName": "tagExample1", "Quality": 192, "UtcTimeStamp": "02/12/2021 11:13:36", "Value": "2" }, { "ObjectName": "tagExample2", "Quality": 192, "UtcTimeStamp": "02/12/2021 11:13:36", "Value": "13" }], "force": false} |
4. Response Example:
"WriteObjectsResult": [true, true] Returns Flag indicating success or fail. |
In this section: