Filter by entity type

Hi all.

using the python api: is it possible to perform “find” filtering by entity type (in single entity fields) ?

Example: on the Versions table I want to find all entries linked to any “Asset” entity.

The very ugly way I found is by creating an ‘in’ operator and passing ALL Asset entries to it in the form of:
{‘type’: ‘Asset’, ‘id’: 12345},
{‘type’: ‘Asset’, ‘id’: 6789}, …etc

…besides ugly that also requires a pre-query to find all items in the relationship entity. Hopefully I’m overlooking something here…

thank you.


Hi there,

I guess the ‘type_is’ operator is what you’re looking for ?

sg.find('Version', [['entity', 'type_is', 'Asset']], ['entity.Asset.code'])

Returns all versions for which the entity is an Asset.
Filters doc,



ah of course, how could I miss that !? =)
thank you.

1 Like