I'd like to perform a search for all Elements under a specific parent element identified by a specific attribute value. What's the url format to do this? How would I search based on two different attribute values?
I'd like to perform a search for all Elements under a specific parent element identified by a specific attribute value. What's the url format to do this? How would I search based on two different attribute values?
Hi Erik Lee ,
I don't think there's a way to do this in 1-Go. But I imagine doing a batch query with 2 steps could work. Please refer to: Batch Execute.
Batch {
}
EDIT: I was using the wrong controller -'attributes' worked!
According to this link I just found, there is a way to do what I'm looking for: Knowledge (osisoft.com)
(see "7.Search for AF Attributes on an AF Database")
However, I cannot seem to get it to work. ("An exception has occurred. Please contact your PI Web API administrator for help in enabling debug mode."
)
I have an element name of 0020228481 and AF Attribute name of kW.
&query=Element:{Name:='0020228481'} Name:kW
Hi Erik Lee,
Your query looks ok to me. Perhaps there may be other issues.
Please try enabling DebugMode in PI Web API server following this article, PI Web API shows this: An exception has occurred. Please contact your PI Web API administrator for help in enabling debug mode.
And re-try your request to see why it failed.
Thanks Jinmo - I had the wrong controller in the url, so it's working now.
I'm glad to hear it's working now! Best,