2 of 2 people found this helpful
- PI Web API 2015 supports bulk retrieval (snapshot, recorded, interpolated, plot, summary) for all or selected attributes from a given parent element or event frame through the StreamSet controller.
- You will need to specify the WebID of the parent together with various filters such as nameFilter for filtering attributes that you want etc.
- There is no way to do that currently. You will need to configure them as different attributes with PIPoint DR in the parent element in your asset hierarchy.
- You can do that by using the filterExpression parameter in all calls except GetPlot and GetValues.
Hi Eugene - Thanks for your reply, I am clear on the first 2 questions and need some clarification on the last 2 questions:
- Yes, we do have different attributes defined as PI Points within the parent element in AF. In the name filter do we separate them by , character ? We don't want to use wildcards, we need to give exact attribute names. Specifically if I have element that has PI Point attributes e.g. Wh_d , Va_avg, max_VAR etc.. how can I retrieve recorded data for only Wh_d and Va_avg. Or can you give any type of sample request using name filter with more than one attribute name.
- We are going to use GetRecorded and it does have filterExpression parameter, but I am thinking filter expression will only filter results of attribute specified in expression so it won't fulfill this requirement.. We are not looking to get result values of attribute in filter expression. Instead we need value of a different attribute, like doing a select query from a database with where condition. Specifically if I have an element that has PI Point attributes e.g. Wh_d and Wh_d_status our requirement is to return recorded values of attribute Wh_d where Wh_d_status =2. Do you think that is possible ?
- From my testing, I have not been able to find a way to do what you want. (i,e, using name filter with more than one attribute name) I think you can only do that by making more than one call. Other might want to chime in here.
- For this request, I think that you don't have to use 'where'. Let me explain why. SQL queries such as 'where' works because the data is in a relational format. Whereas for our case, the PIPoint time series are independent of each other. With that being said, the only thing that can link these two time series together will be the time stamp. So in your case, all you have to do is specify ?'Wh_d_status'=2 at the end of your url. Here is a sample that I tested.
The parent element only has 3 attributes, "Attribute1" and "Attribute2" and "Root Attribute". "Root Attribute" didn't return anything since it didn't have an archive value at the corresponding timestamp where "Attribute2"=222