Aggregate files metadata
- async AsyncCogniteClient.files.aggregate_count(
- filter: FileMetadataFilter | dict[str, Any] | None = None,
-
- Parameters:
filter (FileMetadataFilter | dict[str, Any] | None) – Filter on file metadata filter with exact match
- Returns:
Count of files matching the filter.
- Return type:
int
Examples
Get the count of files that have been uploaded:
>>> from cognite.client import CogniteClient, AsyncCogniteClient >>> client = CogniteClient() >>> # async_client = AsyncCogniteClient() # another option >>> aggregate_uploaded = client.files.aggregate_count(filter={"uploaded": True})