AnsweredAssumed Answered

PI Web API: Query in one Request

Question asked by PFC5478 on Mar 12, 2015
Latest reply on Mar 15, 2015 by mhalhead

Hi all,

 

I think I should have some misconception and I do appreciate if anyone can clarify me.

 

According to https://techsupport.osisoft.com/Troubleshooting/KB/KB01128 , in section "Sample Request", three queries

would need to query for getting the Snapshot:

 

1. Use the Search API to obtain the WebID of the Element.

2. Use the Element API to obtain the WebID of the Attribute.

3. Use the Stream API to request the Snapshot Value.

(Above reference has mentioned Step 2 and Step 3 can be combined to one step by using "response.Items.Links.Value".)

 

I would like to ask is it possible to make a single query to replace above 3 steps which can get the Snapshot Value, assume the point

(for PI Server Tag Point) or element (for AF Server Tag) is known in advance? e.g. (Below syntax is wrong. If it is possible, I want to

know the correct syntax.)

 

https://<piwebapiserver>/piwebapi/stream/[elements?path=<elementpath>]/value

or

(according above reference) https://localhost/piwebapi/streams/[elements?path=\\MYPISERVER\NuGreen\NuGreen\Houston\Cracking Process\Equipment\B-210|Fuel Gas Flow]/value

 

Thank you all for your kind attention.

Outcomes