Skip to main content
19-Tanzanite
August 30, 2018
Question

Is it possible to use SpotlightSearch to search for multiple entity types in one service call?

  • August 30, 2018
  • 1 reply
  • 2033 views

I need to get a list of all the DataTables, Streams, ValueStreams, Blogs and Wikis that belong to a project. It seems the only service that can facilitate this is SpotlightSearch, which works perfect with the field thingShapes set as {items: ["DataTable"]}, but when trying to add another item in that array it returns nothing (meaning when we add {items: ["DataTable","Stream"]}), with no error.

So, is there a way to get all the entities of those types in a single call? It seems to be a bug, from what I looked at, but maybe I'm doing something wrong?

 

For reference, the other parameters I used in the calls were:

-searchExpression: *

-types: {items:["Thing"]}

1 reply

22-Sapphire I
August 30, 2018

Bit of a long shot, not sure what different iterations you've tried but.

{items: ["DataTable,Stream"]}

or even crazier

{items: ["'DataTable','Stream'"]}

19-Tanzanite
August 30, 2018
Tried both now and they did not work. A workaround exists, of course, calling the service 5 times and then doing union 4 times...but my feeling is that this should work.
1-Visitor
September 3, 2018

Hello Vlad!

 

Just a dumb answer, you should be querying thingTemplates parameter instead 😉

 

Regards,

Carles.