Jump to content

How to search ancestors with Items API


Recommended Posts

Hi,

 

I'm trying to use the Item API to search to find a signals that have a specific name and they are in specific part of the asset tree.

Here is what I am trying now and doesn't work:image.png.fab46fe3e8f4c96e8d280c7d74d899ab.png

 

This is how the item properties look like, and I'm unable to filter for this ancestors in any way.

image.png.79c48e24aa47db83b1e7d1b186d40a85.png

What would be the filters syntax that would help me filter for the assets/ancestors?

 

Thank you for your time in advance

Link to comment
Share on other sites

22 hours ago, Thorsten Vogt said:

Hello Robert,

not sure if you can use the ancestors in the "filters" parameter. I think you would need to know the ID of the asset you are looking for and use it in the "asset" parameter of the /items endpoint.

Regards,

Thorsten

Thank you Thorsten for checking it. I wanted to use it in the URL builder https://support.seeq.com/kb/R63/cloud/building-a-worksheet-from-url-query-parameters where the trenditems search can use this API

Link to comment
Share on other sites

  • Seeq Team

Hi Robert,

Thorsten is correct. This is how I would perform the search in the API Reference page:

image.png

where asset contains the ID of Area A from the Example data source, and I am search for the Temperature signal.

 

Regards,

Chris

Link to comment
Share on other sites

  • Seeq Team

Hey Robert,

If you are trying to use the URL builder you could pass in the full path to the signal like so:
 

https://<your_seeq_server>/workbook/builder?workbookName=TestWorkbook&worksheetName=TestWorksheet&trendItems=Example>>Cooling%20Tower%201>>Area%20A>>Compressor%20Power

This will add the Compressor Power signal from the following path as a trend item:

Example >> Cooling Tower 1 >> Area A >> Compressor Power

Regards,

Chris

Link to comment
Share on other sites

15 hours ago, Chris Herrera said:

This will add the Compressor Power signal from the following path as a trend item:

Example >> Cooling Tower 1 >> Area A >> Compressor Power

Hi Chris,

thank you for you asnwer. I was adding AF elements like this, but the new development idea was that can we show also all of the Compressor Powers under the Cooling Tower 1, like how it is done in the Treeview.

Link to comment
Share on other sites

  • Seeq Team

Hi Robert,

You might be looking to apply the asset query parameter to the search:

image.png

The ID I've placed in the asset field was obtained from the info i in the Data panel for Cooling Tower 1:

image.png

The results are the same as if you had navigated to Cooling Tower 1 and searched for "Compressor Power" with the Exact Match checkbox checked.  Here's part of the result

image.png

You can also use SPy in Seeq Data Lab to have much finer-grained control over the search results, so if you haven't given that a whirl, I'd suggest checking it out - quite powerful!

Cheers,
James DeMarco

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...