Reverse Lookup

async AsyncCogniteClient.annotations.reverse_lookup(
filter: AnnotationReverseLookupFilter,
limit: int | None = None,
) ResourceReferenceList

Reverse lookup annotated resources based on having annotations matching the filter.

Parameters:
Returns:

List of resource references

Return type:

ResourceReferenceList

Examples

Retrieve the first 100 ids of annotated resources mathing the ‘file’ resource type:

>>> from cognite.client import CogniteClient
>>> from cognite.client.data_classes import AnnotationReverseLookupFilter
>>> client = CogniteClient()
>>> # async_client = AsyncCogniteClient()  # another option
>>> flt = AnnotationReverseLookupFilter(annotated_resource_type="file")
>>> res = client.annotations.reverse_lookup(flt, limit=100)