AnsweredAssumed Answered

PI WEB API GetValues query

Question asked by JamesIggulden on Feb 5, 2016
Latest reply on Mar 1, 2016 by pthivierge

Hello,

 

I've been exercising the PI WEB API GetValues method (https://techsupport.osisoft.com/Documentation/PI-Web-API/help/controllers/streamset/actions/getvalues.html ) against the dummy data which gets supplied with the PI Server install.

When I formulate a query with no time parameter specified, the result appears to be the values with the closest prior timestamp to now.

For example, if I execute a query at 12:30, I might get the values:

 

Tag name: BA:TEMP.1

Readings:

{UnitsAbbreviation=, Substituted=false, Value=18.5690861, Good=true, Timestamp=2016-02-05T12:28:50Z, Questionable=false}

 

Tag name: SINUSOID

Readings:

{UnitsAbbreviation=, Substituted=false, Value=62.8774452, Good=true, Timestamp=2016-02-05T12:29:51Z, Questionable=false}

 

However, if I specify the time to be e.g. 'Yesterday', I will get (note the returned timestamp):

 

Tag name: BA:TEMP.1

Readings:

{UnitsAbbreviation=, Substituted=false, Value=21.131424, Good=true, Timestamp=2016-02-04T00:00:00Z, Questionable=false}

 

Tag name: SINUSOID

Readings:

{UnitsAbbreviation=, Substituted=false, Value=29.765192, Good=true, Timestamp=2016-02-04T00:00:00Z, Questionable=false}

 

In the first case (no time specified) I appear to be getting the closest actual recording.

In the second, I assume I am getting an interpolated value.

 

Is this correct and is this the expected behaviour?

I note that there is also a GetInterpolated action (https://techsupport.osisoft.com/Documentation/PI-Web-API/help/controllers/streamset/actions/getinterpolated.html ) - shouldn't getting interpolated data be reserved for that action?

 

Many thanks,

James

Outcomes