ProcessValues
- Last UpdatedSep 11, 2023
- 3 minute read
|
Description |
Retrieves a set of process value records (where each record includes value + time + OPC quality, or VTQ) for the specified tags. |
|
URL |
/ProcessValues |
|
Method |
GET |
|
Required Parameters |
|
|
Optional Parameters |
|
|
Success Response |
Code: 200 |
|
Error Response |
Code: 404 NOT FOUND or Code: 401 UNAUTHORIZED |
|
Sample Query |
Scenario 1 This query produces process values for a list of tags that end with "level". In this case, the user doesn't know the fully qualified name (FQN) of a specific tag and wants a short list of possible matches.
https://online.wonderware.[DOMAINSUFFIX]/apis/historian/v2/ProcessValues Scenario 2 This query returns process values for a specific tag identified by its fully qualified name (datasource.tagname). Using a"$filter" clause, it specifies a tag named tank_level within the Baytown data source. The result is a list of values for the tank_level tag.
https://online.wonderware.[DOMAINSUFFIX]/apis/historian/v2/ProcessValues Scenario 3 This query includes a start date time, end date time, and other query parameters.
https://online.wonderware.[DOMAINSUFFIX]/apis/historian/v2/ProcessValues Scenario 4 This query contains three tags in the FQN array: one string, one discrete, and one analog. The analog tag in the array is a different tag than the one included in the Expression. The tags in the array will not be converted. https://online.wonderware.[DOMAINSUFFIX]/apis/Historian/v2/ProcessValues?FQN="DataSource.Line3.analog",DataSource.Line3.string", DataSource.Line3.discrete",&StartDateTime="2021-07-11T00:00:00.000Z"&EndDateTime="2021-07-12T00:00:00.000Z"&Expression="UOM([DataSource.Line4.analog2],[K]) as [Analog2Alias]&RetrievalMode=Full Scenario 5 This query retrieves the current value for the specified FQN. https://online.wonderware.[DOMAINSUFFIX]/apis/Historian/v2/ProcessValues?RetrievalMode=StartBound&$filter=FQN eq 'MountainWaterTreatment.CartridgeFilterOutlet.TemperatureC' |
|
Sample Output |
{ "odata.metadata": "https://online.wonderware.[DOMAINSUFFIX]/apis/historian/v2/ "value": [ { "FQN": "20140805AK.TestSkipToken_0", "DateTime": "2014-08-06T17:25:19.216486Z", "OpcQuality": 192, "Value": 39816, "Text": "39816" "TimeDeadband": 6000 "ValueDeadband": 1.25 }, { "FQN": "20140805AK.TestSkipToken_0", "DateTime": "2014-08-06T17:25:20.196Z", "OpcQuality": 192, "Value": 39817, "Text": "39817" "TimeDeadband": 6000 "ValueDeadband": 1.25 } ], } |