Reverse Lookup
- async AsyncCogniteClient.annotations.reverse_lookup(
- filter: AnnotationReverseLookupFilter,
- limit: int | None = None,
Reverse lookup annotated resources based on having annotations matching the filter.
Deprecated since version 8.23.0: The Annotations API is deprecated and is scheduled for removal on 2027-12-31. Move annotations to CogniteAnnotation in the core data model. See https://docs.cognite.com/cdf/deprecated for details and migration guidance.
- 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 matching 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)