I am having some trouble imagining how some common application queries could be implemented using the PI WebAPI. These types of queries are possible with OLEDB or even the discontinued OData interface. But it seems to be difficult to do them with the PI WebAPI. One example is "get the values for a specific attribute(s) from all elements of a certain template".
e.g. The current value of the efficiency attribute on all elements of type "Pump"
I can see that this could be done as follows
Query with the Search interface to find all Pumps
Or query with the WebAPI to find all pumps:
For each of the pumps, need to find the WebID of each of the efficiency attribute
This is a HTTP GET for each pump
Build a URL using the WebIDs from that will return all the current values for each efficiency attribute with one request (I believe this is possible in PI WebAPI 2015R2)
My question is: Is this the best way to do it with PI WebAPI, or is there a more efficient way?