Reverse Lookup
- async AsyncCogniteClient.annotations.reverse_lookup(
- filter: AnnotationReverseLookupFilter,
- limit: int | None = None,
Reverse lookup annotated resources based on having annotations matching the filter.
- Parameters:
filter (AnnotationReverseLookupFilter) – Filter to apply
limit (int | None) – Maximum number of results to return. Defaults to None (all).
- Returns:
List of resource references
- Return type:
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)